hc
2024-05-16 8d2a02b24d66aa359e83eebc1ed3c0f85367a1cb
kernel/include/linux/tty_ldisc.h
....@@ -54,10 +54,16 @@
5454 * low-level driver can "grab" an ioctl request before the line
5555 * discpline has a chance to see it.
5656 *
57
- * long (*compat_ioctl)(struct tty_struct * tty, struct file * file,
57
+ * int (*compat_ioctl)(struct tty_struct * tty, struct file * file,
5858 * unsigned int cmd, unsigned long arg);
5959 *
6060 * Process ioctl calls from 32-bit process on 64-bit system
61
+ *
62
+ * NOTE: only ioctls that are neither "pointer to compatible
63
+ * structure" nor tty-generic. Something private that takes
64
+ * an integer or a pointer to wordsize-sensitive structure
65
+ * belongs here, but most of ldiscs will happily leave
66
+ * it NULL.
6167 *
6268 * void (*set_termios)(struct tty_struct *tty, struct ktermios * old);
6369 *
....@@ -120,6 +126,7 @@
120126 #include <linux/fs.h>
121127 #include <linux/wait.h>
122128 #include <linux/atomic.h>
129
+#include <linux/android_kabi.h>
123130
124131 /*
125132 * the semaphore definition
....@@ -179,12 +186,13 @@
179186 void (*close)(struct tty_struct *);
180187 void (*flush_buffer)(struct tty_struct *tty);
181188 ssize_t (*read)(struct tty_struct *tty, struct file *file,
182
- unsigned char __user *buf, size_t nr);
189
+ unsigned char *buf, size_t nr,
190
+ void **cookie, unsigned long offset);
183191 ssize_t (*write)(struct tty_struct *tty, struct file *file,
184192 const unsigned char *buf, size_t nr);
185193 int (*ioctl)(struct tty_struct *tty, struct file *file,
186194 unsigned int cmd, unsigned long arg);
187
- long (*compat_ioctl)(struct tty_struct *tty, struct file *file,
195
+ int (*compat_ioctl)(struct tty_struct *tty, struct file *file,
188196 unsigned int cmd, unsigned long arg);
189197 void (*set_termios)(struct tty_struct *tty, struct ktermios *old);
190198 __poll_t (*poll)(struct tty_struct *, struct file *,
....@@ -204,6 +212,9 @@
204212 struct module *owner;
205213
206214 int refcount;
215
+
216
+ ANDROID_KABI_RESERVE(1);
217
+ ANDROID_KABI_RESERVE(2);
207218 };
208219
209220 struct tty_ldisc {