summaryrefslogtreecommitdiff
path: root/include/linux/devpts_fs.h
diff options
context:
space:
mode:
authorAlexander Viro <viro@math.psu.edu>2002-07-04 08:53:12 -0700
committerLinus Torvalds <torvalds@home.transmeta.com>2002-07-04 08:53:12 -0700
commit2aa859378756ae63d41b2cafb8bcdb9246afeb95 (patch)
tree958d1e3d7724af9f433b9ec1e45d53af28a5fc0e /include/linux/devpts_fs.h
parent2ffe5f2f17d6698d1b0e78c43a4b9eb91426340d (diff)
[PATCH] devpts cleanup
* devpts "upcalls" eliminated. * instead of playing games with revalidation we simply use ramfs-style tree and kill dentries upon devpts_pty_kill(). That allows to get rid of a lot of code in fs/devpts/*.c. * devpts_fs.h cleaned up. * devpts/root.c and devpts/devpts_i.h removed. * array of pointers to devpts inodes killed; with ramfs-style tree it's not needed anymore. * devpts/inode.c cleaned up. * devpts_pty_new() used to get mk_kdev() only to convert it to dev_t (hardly a surprise, since it's mknod() in disguise). Now it gets dev_t as an argument.
Diffstat (limited to 'include/linux/devpts_fs.h')
-rw-r--r--include/linux/devpts_fs.h49
1 files changed, 4 insertions, 45 deletions
diff --git a/include/linux/devpts_fs.h b/include/linux/devpts_fs.h
index 38164e6b2bbf..4def3512b355 100644
--- a/include/linux/devpts_fs.h
+++ b/include/linux/devpts_fs.h
@@ -10,64 +10,23 @@
*
* ------------------------------------------------------------------------- */
-/*
- * Prototypes for the pty driver <-> devpts filesystem interface. Most
- * of this is really just a hack so we can exclude it or build it as a
- * module, and probably should go away eventually.
- */
-
#ifndef _LINUX_DEVPTS_FS_H
#define _LINUX_DEVPTS_FS_H 1
-#include <linux/config.h>
-#include <linux/kdev_t.h>
-#include <linux/tty.h>
-
#ifdef CONFIG_DEVPTS_FS
-void devpts_pty_new(int, kdev_t);
-void devpts_pty_kill(int);
-#define unix98_max_ptys NR_PTYS * UNIX98_NR_MAJORS;
-
-#elif defined(CONFIG_DEVPTS_FS_MODULE)
+void devpts_pty_new(int, dev_t); /* mknod in devpts */
+void devpts_pty_kill(int); /* unlink */
-#ifdef BUILDING_PTY_C
-void (*devpts_upcall_new)(int,kdev_t) = NULL;
-void (*devpts_upcall_kill)(int) = NULL;
-unsigned int unix98_max_ptys = NR_PTYS * UNIX98_NR_MAJORS;
-
-EXPORT_SYMBOL(devpts_upcall_new);
-EXPORT_SYMBOL(devpts_upcall_kill);
-EXPORT_SYMBOL(unix98_max_ptys);
#else
-extern void (*devpts_upcall_new)(int,kdev_t);
-extern void (*devpts_upcall_kill)(int);
-extern unsigned int unix98_max_ptys;
-#endif
-#ifndef BUILDING_DEVPTS
-static inline void
-devpts_pty_new(int line, kdev_t device)
+static inline void devpts_pty_new(int line, dev_t device)
{
- if ( devpts_upcall_new )
- return devpts_upcall_new(line,device);
}
-static inline void
-devpts_pty_kill(int line)
+static inline void devpts_pty_kill(int line)
{
- if ( devpts_upcall_kill )
- return devpts_upcall_kill(line);
}
-#endif
-
-#else /* No /dev/pts filesystem at all */
-
-static inline void
-devpts_pty_new(int line, kdev_t device) { }
-
-static inline void
-devpts_pty_kill(int line) { }
#endif