From: Christoph Hellwig <hch@lst.de>
To: akpm@osdl.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] TIOC* compat ioctl handling
Date: Mon, 19 Sep 2005 17:12:44 +0200 [thread overview]
Message-ID: <20050919151244.GB13544@lst.de> (raw)
TIOCSTART and TIOCSTOP are defined in asm/ioctls.h and asm/termios.h
by various architectures but not actually implemented anywhere but in
the IRIX compatibility layer, so remove their COMPATIBLE_IOCTL from
parisc, ppc64 and sparc64.
Move the TIOCSLTC COMPATIBLE_IOCTL to common code, guided by an ifdef
to only show up on architectures that support it (same as the code
handling it in tty_ioctl.c), aswell as it's brother TIOCGLTC that
wasn't handled so far.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Index: linux-2.6/arch/parisc/kernel/ioctl32.c
===================================================================
--- linux-2.6.orig/arch/parisc/kernel/ioctl32.c 2005-09-19 15:18:12.000000000 +0200
+++ linux-2.6/arch/parisc/kernel/ioctl32.c 2005-09-19 15:19:35.000000000 +0200
@@ -37,11 +37,6 @@
#define DECLARES
#include "compat_ioctl.c"
-/* Might be moved to compat_ioctl.h with some ifdefs... */
-COMPATIBLE_IOCTL(TIOCSTART)
-COMPATIBLE_IOCTL(TIOCSTOP)
-COMPATIBLE_IOCTL(TIOCSLTC)
-
/* PA-specific ioctls */
COMPATIBLE_IOCTL(PA_PERF_ON)
COMPATIBLE_IOCTL(PA_PERF_OFF)
Index: linux-2.6/arch/ppc64/kernel/ioctl32.c
===================================================================
--- linux-2.6.orig/arch/ppc64/kernel/ioctl32.c 2005-09-18 13:46:55.000000000 +0200
+++ linux-2.6/arch/ppc64/kernel/ioctl32.c 2005-09-19 15:19:35.000000000 +0200
@@ -39,9 +39,7 @@
#include <linux/compat_ioctl.h>
#define DECLARES
#include "compat_ioctl.c"
-COMPATIBLE_IOCTL(TIOCSTART)
-COMPATIBLE_IOCTL(TIOCSTOP)
-COMPATIBLE_IOCTL(TIOCSLTC)
+
/* Little p (/dev/rtc, /dev/envctrl, etc.) */
COMPATIBLE_IOCTL(_IOR('p', 20, int[7])) /* RTCGET */
COMPATIBLE_IOCTL(_IOW('p', 21, int[7])) /* RTCSET */
Index: linux-2.6/arch/sparc64/kernel/ioctl32.c
===================================================================
--- linux-2.6.orig/arch/sparc64/kernel/ioctl32.c 2005-09-19 15:18:12.000000000 +0200
+++ linux-2.6/arch/sparc64/kernel/ioctl32.c 2005-09-19 15:19:35.000000000 +0200
@@ -124,9 +124,6 @@
#include <linux/compat_ioctl.h>
#define DECLARES
#include "compat_ioctl.c"
-COMPATIBLE_IOCTL(TIOCSTART)
-COMPATIBLE_IOCTL(TIOCSTOP)
-COMPATIBLE_IOCTL(TIOCSLTC)
COMPATIBLE_IOCTL(FBIOGTYPE)
COMPATIBLE_IOCTL(FBIOSATTR)
COMPATIBLE_IOCTL(FBIOGATTR)
Index: linux-2.6/fs/compat_ioctl.c
===================================================================
--- linux-2.6.orig/fs/compat_ioctl.c 2005-09-18 13:47:31.000000000 +0200
+++ linux-2.6/fs/compat_ioctl.c 2005-09-19 15:19:35.000000000 +0200
@@ -3046,6 +3046,10 @@
/* Serial */
HANDLE_IOCTL(TIOCGSERIAL, serial_struct_ioctl)
HANDLE_IOCTL(TIOCSSERIAL, serial_struct_ioctl)
+#ifdef TIOCGLTC
+COMPATIBLE_IOCTL(TIOCGLTC)
+COMPATIBLE_IOCTL(TIOCSLTC)
+#endif
/* Usbdevfs */
HANDLE_IOCTL(USBDEVFS_CONTROL32, do_usbdevfs_control)
HANDLE_IOCTL(USBDEVFS_BULK32, do_usbdevfs_bulk)
next reply other threads:[~2005-09-19 15:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-19 15:12 Christoph Hellwig [this message]
2005-11-02 13:20 [PATCH] TIOC* compat ioctl handling Stephen Rothwell
2005-11-02 16:11 ` Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050919151244.GB13544@lst.de \
--to=hch@lst.de \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).