VFS: further cleanup of device code

- all TTY-related exceptions have now been merged into the regular
  code paths, allowing non-TTY drivers to expose TTY-like devices;
- as part of this, CTTY_MAJOR is now fully managed by VFS instead of
  being an ugly stepchild of the TTY driver;
- device styles have become completely obsolete, support for them has
  been removed throughout the system; same for device flags, which had
  already become useless a while ago;
- device map open/close and I/O function pointers have lost their use,
  thus finally making the VFS device code actually readable;
- the device-unrelated pm_setsid has been moved to misc.c;
- some other small cleanup-related changes.

Change-Id: If90b10d1818e98a12139da3e94a15d250c9933da
This commit is contained in:
David van Moolenbroek
2013-10-06 15:58:54 +02:00
committed by Lionel Sambuc
parent cf12dbac0d
commit 664b726cd3
25 changed files with 274 additions and 564 deletions

View File

@@ -40,7 +40,7 @@ int getprocnr(void);
int getnprocnr(pid_t pid);
int getpprocnr(void);
int _pm_findproc(char *proc_name, int *proc_nr);
int mapdriver(char *label, int major, int style, int flags);
int mapdriver(char *label, int major);
pid_t getnpid(endpoint_t proc_ep);
uid_t getnuid(endpoint_t proc_ep);
gid_t getngid(endpoint_t proc_ep);

View File

@@ -149,9 +149,6 @@
#define LU_SYS_PROC 0x400 /* this is a live updated sys proc instance */
#define RST_SYS_PROC 0x800 /* this is a restarted sys proc instance */
/* Bits for device driver flags managed by RS and VFS. */
#define DRV_FORCED 0x01 /* driver is mapped even if not alive yet */
/* Values for the "verbose" boot monitor variable */
#define VERBOSEBOOT_QUIET 0
#define VERBOSEBOOT_BASIC 1

View File

@@ -4,9 +4,6 @@
#include <minix/sys_config.h>
#include <minix/ipc.h>
enum dev_style { STYLE_NDEV, STYLE_DEV, STYLE_TTY, STYLE_CTTY };
#define IS_DEV_STYLE(s) (s>=STYLE_NDEV && s<=STYLE_CTTY)
/*===========================================================================*
* Major and minor device numbers *
*===========================================================================*/

View File

@@ -73,7 +73,6 @@ struct rs_start
int rss_priority;
int rss_quantum;
int rss_major;
int rss_dev_style;
long rss_period;
char *rss_script;
size_t rss_scriptlen;
@@ -119,10 +118,7 @@ struct rprocpub {
unsigned sys_flags; /* sys flags */
endpoint_t endpoint; /* process endpoint number */
int dev_flags; /* device flags */
dev_t dev_nr; /* major device number */
int dev_style; /* device style */
int dev_style2; /* device style for next major dev number */
dev_t dev_nr; /* major device number or NO_DEV */
char label[RS_MAX_LABEL_LEN]; /* label of this service */
char proc_name[RS_MAX_LABEL_LEN]; /* process name of this service */