* Question about ioctls.h
@ 2001-07-23 23:03 Martin Schulze
2001-07-23 23:27 ` Ralf Baechle
0 siblings, 1 reply; 5+ messages in thread
From: Martin Schulze @ 2001-07-23 23:03 UTC (permalink / raw)
To: linux-mips
Quoting <asm/ioctls.h>:
> #if defined(__USE_MISC) || defined (__KERNEL__)
> #define tIOC ('t' << 8)
> #endif
Could somebody try to explain this to me? I'm especially interested
in the #if part. Why isn't tIOC defined normally? It is used later.
in the file - and it is used externally by rp-pppoe for example.
Regards,
Joey
--
All language designers are arrogant. Goes with the territory...
-- Larry Wall
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Question about ioctls.h
2001-07-23 23:03 Question about ioctls.h Martin Schulze
@ 2001-07-23 23:27 ` Ralf Baechle
2001-07-23 23:56 ` Ralf Baechle
0 siblings, 1 reply; 5+ messages in thread
From: Ralf Baechle @ 2001-07-23 23:27 UTC (permalink / raw)
To: Martin Schulze; +Cc: linux-mips
On Tue, Jul 24, 2001 at 01:03:43AM +0200, Martin Schulze wrote:
> Quoting <asm/ioctls.h>:
>
> > #if defined(__USE_MISC) || defined (__KERNEL__)
> > #define tIOC ('t' << 8)
> > #endif
>
> Could somebody try to explain this to me? I'm especially interested
> in the #if part. Why isn't tIOC defined normally? It is used later.
> in the file - and it is used externally by rp-pppoe for example.
Overly paranoid attempt at keeping the namespace cleaner than Mr Proper
himself.
Ralf
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Question about ioctls.h
2001-07-23 23:27 ` Ralf Baechle
@ 2001-07-23 23:56 ` Ralf Baechle
2001-07-24 8:04 ` Martin Schulze
0 siblings, 1 reply; 5+ messages in thread
From: Ralf Baechle @ 2001-07-23 23:56 UTC (permalink / raw)
To: Martin Schulze; +Cc: linux-mips
On Tue, Jul 24, 2001 at 01:27:58AM +0200, Ralf Baechle wrote:
> > Could somebody try to explain this to me? I'm especially interested
> > in the #if part. Why isn't tIOC defined normally? It is used later.
> > in the file - and it is used externally by rp-pppoe for example.
>
> Overly paranoid attempt at keeping the namespace cleaner than Mr Proper
> himself.
Try the patch below.
Ralf
Index: include/asm-mips64/ioctls.h
===================================================================
RCS file: /home/pub/cvs/linux/include/asm-mips64/ioctls.h,v
retrieving revision 1.2
diff -u -r1.2 ioctls.h
--- include/asm-mips64/ioctls.h 2001/07/09 00:25:38 1.2
+++ include/asm-mips64/ioctls.h 2001/07/23 23:55:09
@@ -3,17 +3,14 @@
* License. See the file "COPYING" in the main directory of this archive
* for more details.
*
- * Copyright (C) 1995, 1996, 1999 by Ralf Baechle
+ * Copyright (C) 1995, 1996, 2001 Ralf Baechle
+ * Copyright (C) 2001 MIPS Technologies, Inc.
*/
-#ifndef _ASM_IOCTLS_H
-#define _ASM_IOCTLS_H
+#ifndef __ASM_IOCTLS_H
+#define __ASM_IOCTLS_H
#include <asm/ioctl.h>
-#if defined(__USE_MISC) || defined (__KERNEL__)
-#define tIOC ('t' << 8)
-#endif
-
#define TCGETA 0x5401
#define TCSETA 0x5402
#define TCSETAW 0x5403
@@ -37,31 +34,27 @@
#define TIOCMBIC 0x741c /* bic modem bits */
#define TIOCMSET 0x741a /* set all modem bits */
#define TIOCPKT 0x5470 /* pty: set/clear packet mode */
-#define TIOCPKT_DATA 0x00 /* data packet */
-#define TIOCPKT_FLUSHREAD 0x01 /* flush packet */
-#define TIOCPKT_FLUSHWRITE 0x02 /* flush packet */
-#define TIOCPKT_STOP 0x04 /* stop output */
-#define TIOCPKT_START 0x08 /* start output */
-#define TIOCPKT_NOSTOP 0x10 /* no more ^S, ^Q */
-#define TIOCPKT_DOSTOP 0x20 /* now do ^S ^Q */
-#if 0
-#define TIOCPKT_IOCTL 0x40 /* state change of pty driver */
-#endif
+#define TIOCPKT_DATA 0x00 /* data packet */
+#define TIOCPKT_FLUSHREAD 0x01 /* flush packet */
+#define TIOCPKT_FLUSHWRITE 0x02 /* flush packet */
+#define TIOCPKT_STOP 0x04 /* stop output */
+#define TIOCPKT_START 0x08 /* start output */
+#define TIOCPKT_NOSTOP 0x10 /* no more ^S, ^Q */
+#define TIOCPKT_DOSTOP 0x20 /* now do ^S ^Q */
+/* #define TIOCPKT_IOCTL 0x40 state change of pty driver */
#define TIOCSWINSZ _IOW('t', 103, struct winsize) /* set window size */
#define TIOCGWINSZ _IOR('t', 104, struct winsize) /* get window size */
#define TIOCNOTTY 0x5471 /* void tty association */
-#define TIOCSETD (tIOC | 1)
-#define TIOCGETD (tIOC | 0)
+#define TIOCSETD 0x7401
+#define TIOCGETD 0x7400
#define FIOCLEX 0x6601
#define FIONCLEX 0x6602 /* these numbers need to be adjusted. */
#define FIOASYNC 0x667d
#define FIONBIO 0x667e
-#if defined(__USE_MISC) || defined (__KERNEL__)
-#define TIOCGLTC (tIOC | 116) /* get special local chars */
-#define TIOCSLTC (tIOC | 117) /* set special local chars */
-#endif
+#define TIOCGLTC 0x7474 /* get special local chars */
+#define TIOCSLTC 0x7475 /* set special local chars */
#define TIOCSPGRP _IOW('t', 118, int) /* set pgrp of tty */
#define TIOCGPGRP _IOR('t', 119, int) /* get pgrp of tty */
#define TIOCCONS _IOW('t', 120, int) /* become virtual console */
@@ -69,20 +62,16 @@
#define FIONREAD 0x467f
#define TIOCINQ FIONREAD
-#if defined(__USE_MISC) || defined (__KERNEL__)
-#define TIOCGETP (tIOC | 8)
-#define TIOCSETP (tIOC | 9)
-#define TIOCSETN (tIOC | 10) /* TIOCSETP wo flush */
-#endif
+#define TIOCGETP 0x7408
+#define TIOCSETP 0x7409
+#define TIOCSETN 0x740a /* TIOCSETP wo flush */
-#if 0
-#define TIOCSETA _IOW('t', 20, struct termios) /* set termios struct */
-#define TIOCSETAW _IOW('t', 21, struct termios) /* drain output, set */
-#define TIOCSETAF _IOW('t', 22, struct termios) /* drn out, fls in, set */
-#define TIOCGETD _IOR('t', 26, int) /* get line discipline */
-#define TIOCSETD _IOW('t', 27, int) /* set line discipline */
+/* #define TIOCSETA _IOW('t', 20, struct termios) set termios struct */
+/* #define TIOCSETAW _IOW('t', 21, struct termios) drain output, set */
+/* #define TIOCSETAF _IOW('t', 22, struct termios) drn out, fls in, set */
+/* #define TIOCGETD _IOR('t', 26, int) get line discipline */
+/* #define TIOCSETD _IOW('t', 27, int) set line discipline */
/* 127-124 compat */
-#endif
/* I hope the range from 0x5480 on is free ... */
#define TIOCSCTTY 0x5480 /* become controlling tty */
@@ -114,4 +103,4 @@
#define TIOCGHAYESESP 0x5493 /* Get Hayes ESP configuration */
#define TIOCSHAYESESP 0x5494 /* Set Hayes ESP configuration */
-#endif /* _ASM_IOCTLS_H */
+#endif /* __ASM_IOCTLS_H */
Index: include/asm-mips/ioctls.h
===================================================================
RCS file: /home/pub/cvs/linux/include/asm-mips/ioctls.h,v
retrieving revision 1.8
diff -u -r1.8 ioctls.h
--- include/asm-mips/ioctls.h 1998/08/25 09:21:56 1.8
+++ include/asm-mips/ioctls.h 2001/07/23 23:55:09
@@ -1,20 +1,16 @@
-/* $Id: ioctls.h,v 1.5 1998/08/19 21:58:11 ralf Exp $
- *
+/*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
* for more details.
*
- * Copyright (C) 1995, 1996 by Ralf Baechle
+ * Copyright (C) 1995, 1996, 2001 Ralf Baechle
+ * Copyright (C) 2001 MIPS Technologies, Inc.
*/
-#ifndef __ASM_MIPS_IOCTLS_H
-#define __ASM_MIPS_IOCTLS_H
+#ifndef __ASM_IOCTLS_H
+#define __ASM_IOCTLS_H
#include <asm/ioctl.h>
-#if defined(__USE_MISC) || defined (__KERNEL__)
-#define tIOC ('t' << 8)
-#endif
-
#define TCGETA 0x5401
#define TCSETA 0x5402
#define TCSETAW 0x5403
@@ -38,31 +34,27 @@
#define TIOCMBIC 0x741c /* bic modem bits */
#define TIOCMSET 0x741a /* set all modem bits */
#define TIOCPKT 0x5470 /* pty: set/clear packet mode */
-#define TIOCPKT_DATA 0x00 /* data packet */
-#define TIOCPKT_FLUSHREAD 0x01 /* flush packet */
-#define TIOCPKT_FLUSHWRITE 0x02 /* flush packet */
-#define TIOCPKT_STOP 0x04 /* stop output */
-#define TIOCPKT_START 0x08 /* start output */
-#define TIOCPKT_NOSTOP 0x10 /* no more ^S, ^Q */
-#define TIOCPKT_DOSTOP 0x20 /* now do ^S ^Q */
-#if 0
-#define TIOCPKT_IOCTL 0x40 /* state change of pty driver */
-#endif
+#define TIOCPKT_DATA 0x00 /* data packet */
+#define TIOCPKT_FLUSHREAD 0x01 /* flush packet */
+#define TIOCPKT_FLUSHWRITE 0x02 /* flush packet */
+#define TIOCPKT_STOP 0x04 /* stop output */
+#define TIOCPKT_START 0x08 /* start output */
+#define TIOCPKT_NOSTOP 0x10 /* no more ^S, ^Q */
+#define TIOCPKT_DOSTOP 0x20 /* now do ^S ^Q */
+/* #define TIOCPKT_IOCTL 0x40 state change of pty driver */
#define TIOCSWINSZ _IOW('t', 103, struct winsize) /* set window size */
#define TIOCGWINSZ _IOR('t', 104, struct winsize) /* get window size */
#define TIOCNOTTY 0x5471 /* void tty association */
-#define TIOCSETD (tIOC | 1)
-#define TIOCGETD (tIOC | 0)
+#define TIOCSETD 0x7401
+#define TIOCGETD 0x7400
#define FIOCLEX 0x6601
#define FIONCLEX 0x6602 /* these numbers need to be adjusted. */
#define FIOASYNC 0x667d
#define FIONBIO 0x667e
-#if defined(__USE_MISC) || defined (__KERNEL__)
-#define TIOCGLTC (tIOC | 116) /* get special local chars */
-#define TIOCSLTC (tIOC | 117) /* set special local chars */
-#endif
+#define TIOCGLTC 0x7474 /* get special local chars */
+#define TIOCSLTC 0x7475 /* set special local chars */
#define TIOCSPGRP _IOW('t', 118, int) /* set pgrp of tty */
#define TIOCGPGRP _IOR('t', 119, int) /* get pgrp of tty */
#define TIOCCONS _IOW('t', 120, int) /* become virtual console */
@@ -70,20 +62,16 @@
#define FIONREAD 0x467f
#define TIOCINQ FIONREAD
-#if defined(__USE_MISC) || defined (__KERNEL__)
-#define TIOCGETP (tIOC | 8)
-#define TIOCSETP (tIOC | 9)
-#define TIOCSETN (tIOC | 10) /* TIOCSETP wo flush */
-#endif
+#define TIOCGETP 0x7408
+#define TIOCSETP 0x7409
+#define TIOCSETN 0x740a /* TIOCSETP wo flush */
-#if 0
-#define TIOCSETA _IOW('t', 20, struct termios) /* set termios struct */
-#define TIOCSETAW _IOW('t', 21, struct termios) /* drain output, set */
-#define TIOCSETAF _IOW('t', 22, struct termios) /* drn out, fls in, set */
-#define TIOCGETD _IOR('t', 26, int) /* get line discipline */
-#define TIOCSETD _IOW('t', 27, int) /* set line discipline */
+/* #define TIOCSETA _IOW('t', 20, struct termios) set termios struct */
+/* #define TIOCSETAW _IOW('t', 21, struct termios) drain output, set */
+/* #define TIOCSETAF _IOW('t', 22, struct termios) drn out, fls in, set */
+/* #define TIOCGETD _IOR('t', 26, int) get line discipline */
+/* #define TIOCSETD _IOW('t', 27, int) set line discipline */
/* 127-124 compat */
-#endif
/* I hope the range from 0x5480 on is free ... */
#define TIOCSCTTY 0x5480 /* become controlling tty */
@@ -115,4 +103,4 @@
#define TIOCGHAYESESP 0x5493 /* Get Hayes ESP configuration */
#define TIOCSHAYESESP 0x5494 /* Set Hayes ESP configuration */
-#endif /* __ASM_MIPS_IOCTLS_H */
+#endif /* __ASM_IOCTLS_H */
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Question about ioctls.h
2001-07-23 23:56 ` Ralf Baechle
@ 2001-07-24 8:04 ` Martin Schulze
2001-07-24 11:23 ` Ralf Baechle
0 siblings, 1 reply; 5+ messages in thread
From: Martin Schulze @ 2001-07-24 8:04 UTC (permalink / raw)
To: Ralf Baechle; +Cc: linux-mips
Ralf Baechle wrote:
> On Tue, Jul 24, 2001 at 01:27:58AM +0200, Ralf Baechle wrote:
>
> > > Could somebody try to explain this to me? I'm especially interested
> > > in the #if part. Why isn't tIOC defined normally? It is used later.
> > > in the file - and it is used externally by rp-pppoe for example.
> >
> > Overly paranoid attempt at keeping the namespace cleaner than Mr Proper
> > himself.
>
> Try the patch below.
Thanks, looks good and works well. Somebody should commit it.
Regards,
Joey
--
In the beginning was the word, and the word was content-type: text/plain
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Question about ioctls.h
2001-07-24 8:04 ` Martin Schulze
@ 2001-07-24 11:23 ` Ralf Baechle
0 siblings, 0 replies; 5+ messages in thread
From: Ralf Baechle @ 2001-07-24 11:23 UTC (permalink / raw)
To: Martin Schulze; +Cc: linux-mips
On Tue, Jul 24, 2001 at 10:04:18AM +0200, Martin Schulze wrote:
> > > > Could somebody try to explain this to me? I'm especially interested
> > > > in the #if part. Why isn't tIOC defined normally? It is used later.
> > > > in the file - and it is used externally by rp-pppoe for example.
> > >
> > > Overly paranoid attempt at keeping the namespace cleaner than Mr Proper
> > > himself.
> >
> > Try the patch below.
>
> Thanks, looks good and works well. Somebody should commit it.
I immediately commited it for both 2.2 and 2.4, mips and mips64. You can
follow the commits on the linux-cvs@oss.sgi.com mailing lists. Just
subscribe via Majordomo.
Ralf
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2001-07-24 11:24 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-07-23 23:03 Question about ioctls.h Martin Schulze
2001-07-23 23:27 ` Ralf Baechle
2001-07-23 23:56 ` Ralf Baechle
2001-07-24 8:04 ` Martin Schulze
2001-07-24 11:23 ` Ralf Baechle
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.