lkml.org 
[lkml]   [1999]   [May]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: Problem with lp.h
Date
From
>The file include/linux/lp.h seems to have code in it, related to wait
>queues, that should be available only to the kernel, but is not hidden
>from user-space programs.

Good point. Actually, there is a lot of other cruft there that should
probably be concealed from user space. I guess something like:

--- lp.h~ Sun May 16 13:07:07 1999
+++ lp.h Sun May 16 13:07:47 1999
@@ -7,12 +7,6 @@
* Interrupt support added 1993 Nigel Gamble
*/

-/* Magic numbers for defining port-device mappings */
-#define LP_PARPORT_UNSPEC -4
-#define LP_PARPORT_AUTO -3
-#define LP_PARPORT_OFF -2
-#define LP_PARPORT_NONE -1
-
/*
* Per POSIX guidelines, this module reserves the LP and lp prefixes
* These are the lp_table[minor].flags flags...
@@ -87,6 +81,14 @@
#define LP_TIMEOUT_INTERRUPT (60 * HZ)
#define LP_TIMEOUT_POLLED (10 * HZ)

+#ifdef __KERNEL__
+
+/* Magic numbers for defining port-device mappings */
+#define LP_PARPORT_UNSPEC -4
+#define LP_PARPORT_AUTO -3
+#define LP_PARPORT_OFF -2
+#define LP_PARPORT_NONE -1
+
#define LP_F(minor) lp_table[(minor)].flags /* flags for busy, etc. */
#define LP_CHAR(minor) lp_table[(minor)].chars /* busy timeout */
#define LP_TIME(minor) lp_table[(minor)].time /* wait time */
@@ -180,5 +182,7 @@
*/

extern int lp_init(void);
+
+#endif

#endif
p.



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:51    [W:0.028 / U:1.144 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site