Driver mapping refactory.
VFS CHANGES: - dmap table no longer statically initialized in VFS - Dropped FSSIGNON svrctl call no longer used by INET INET CHANGES: - INET announces its presence to VFS just like any other driver RS CHANGES: - The boot image dev table contains all the data to initialize VFS' dmap table - RS interface supports asynchronous up and update operations now - RS interface extended to support driver style and flags
This commit is contained in:
@@ -59,11 +59,29 @@ PUBLIC void fproc_dmp()
|
||||
PRIVATE char * dmap_flags(int flags)
|
||||
{
|
||||
static char fl[10];
|
||||
strcpy(fl, "---");
|
||||
if(flags & DMAP_MUTABLE) fl[0] = 'M';
|
||||
strcpy(fl, "-----");
|
||||
if(flags & DRV_FORCED) fl[0] = 'F';
|
||||
return fl;
|
||||
}
|
||||
|
||||
/*===========================================================================*
|
||||
* dmap_style *
|
||||
*===========================================================================*/
|
||||
PRIVATE char * dmap_style(int dev_style)
|
||||
{
|
||||
static char str[16];
|
||||
switch(dev_style) {
|
||||
case STYLE_DEV: strcpy(str, "STYLE_DEV"); break;
|
||||
case STYLE_DEVA: strcpy(str, "STYLE_DEVA"); break;
|
||||
case STYLE_TTY: strcpy(str, "STYLE_TTY"); break;
|
||||
case STYLE_CTTY: strcpy(str, "STYLE_CTTY"); break;
|
||||
case STYLE_CLONE: strcpy(str, "STYLE_CLONE"); break;
|
||||
default: strcpy(str, "UNKNOWN"); break;
|
||||
}
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
/*===========================================================================*
|
||||
* dtab_dmp *
|
||||
*===========================================================================*/
|
||||
@@ -74,12 +92,13 @@ PUBLIC void dtab_dmp()
|
||||
getsysinfo(FS_PROC_NR, SI_DMAP_TAB, dmap);
|
||||
|
||||
printf("File System (FS) device <-> driver mappings\n");
|
||||
printf("Major Driver ept Flags\n");
|
||||
printf("----- ---------- -----\n");
|
||||
printf(" Label Major Driver ept Flags Style \n");
|
||||
printf("------------- ----- ---------- ----- -------------\n");
|
||||
for (i=0; i<NR_DEVICES; i++) {
|
||||
if (dmap[i].dmap_driver == NONE) continue;
|
||||
printf("%5d %10d %s\n",
|
||||
i, dmap[i].dmap_driver, dmap_flags(dmap[i].dmap_flags));
|
||||
printf("%13s %5d %10d %s %-13s\n",
|
||||
dmap[i].dmap_label, i, dmap[i].dmap_driver,
|
||||
dmap_flags(dmap[i].dmap_flags), dmap_style(dmap[i].dmap_style));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user