Skip to content

Commit f23653f

Browse files
maciej-w-rozyckigregkh
authored andcommitted
tty: Partially revert the removal of the Cyclades public API
Fix a user API regression introduced with commit f76edd8 ("tty: cyclades, remove this orphan"), which removed a part of the API and caused compilation errors for user programs using said part, such as GCC 9 in its libsanitizer component[1]: .../libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc:160:10: fatal error: linux/cyclades.h: No such file or directory 160 | #include <linux/cyclades.h> | ^~~~~~~~~~~~~~~~~~ compilation terminated. make[4]: *** [Makefile:664: sanitizer_platform_limits_posix.lo] Error 1 As the absolute minimum required bring `struct cyclades_monitor' and ioctl numbers back then so as to make the library build again. Add a preprocessor warning as to the obsolescence of the features provided. References: [1] GCC PR sanitizer/100379, "cyclades.h is removed from linux kernel header files", <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100379> Fixes: f76edd8 ("tty: cyclades, remove this orphan") Cc: [email protected] # v5.13+ Reviewed-by: Christoph Hellwig <[email protected]> Signed-off-by: Maciej W. Rozycki <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 152d1af commit f23653f

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

include/uapi/linux/cyclades.h

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2+
3+
#ifndef _UAPI_LINUX_CYCLADES_H
4+
#define _UAPI_LINUX_CYCLADES_H
5+
6+
#warning "Support for features provided by this header has been removed"
7+
#warning "Please consider updating your code"
8+
9+
struct cyclades_monitor {
10+
unsigned long int_count;
11+
unsigned long char_count;
12+
unsigned long char_max;
13+
unsigned long char_last;
14+
};
15+
16+
#define CYGETMON 0x435901
17+
#define CYGETTHRESH 0x435902
18+
#define CYSETTHRESH 0x435903
19+
#define CYGETDEFTHRESH 0x435904
20+
#define CYSETDEFTHRESH 0x435905
21+
#define CYGETTIMEOUT 0x435906
22+
#define CYSETTIMEOUT 0x435907
23+
#define CYGETDEFTIMEOUT 0x435908
24+
#define CYSETDEFTIMEOUT 0x435909
25+
#define CYSETRFLOW 0x43590a
26+
#define CYGETRFLOW 0x43590b
27+
#define CYSETRTSDTR_INV 0x43590c
28+
#define CYGETRTSDTR_INV 0x43590d
29+
#define CYZSETPOLLCYCLE 0x43590e
30+
#define CYZGETPOLLCYCLE 0x43590f
31+
#define CYGETCD1400VER 0x435910
32+
#define CYSETWAIT 0x435912
33+
#define CYGETWAIT 0x435913
34+
35+
#endif /* _UAPI_LINUX_CYCLADES_H */

0 commit comments

Comments
 (0)