2002-01-03 00:01:58

by James Simmons

[permalink] [raw]
Subject: [PATCH] pre6 tty_io.c and devfs broken


If you have devfs on tty_io.c doesn't compile. This patch fixes this
problem.

. ---
|o_o |
|:_/ | Give Micro$oft the Bird!!!!
// \ \ Use Linux!!!!
(| | )
/'_ _/`\
___)=(___/

--- /usr/src/linux-2.5.2-pre6/drivers/char/tty_io.c Wed Jan 2 14:07:54 2002
+++ tty_io.c Wed Jan 2 16:53:20 2002
@@ -2006,15 +2006,11 @@
int idx = minor - driver->minor_start;
char buf[32];

- switch (device) {
- case TTY_DEV:
- case PTMX_DEV:
+ if (IS_TTY_DEV(device) || IS_PTMX_DEV(device))
+ mode |= S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH;
+ else {
+ if (driver->major == PTY_MASTER_MAJOR)
mode |= S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH;
- break;
- default:
- if (driver->major == PTY_MASTER_MAJOR)
- mode |= S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH;
- break;
}
if ( (minor < driver->minor_start) ||
(minor >= driver->minor_start + driver->num) ) {