Add DEV_CLONE_A dev type

This commit is contained in:
Thomas Veerman 2011-07-27 12:23:03 +00:00
parent 9b43de2cb3
commit ece4c9d565
6 changed files with 8 additions and 5 deletions

View file

@ -334,9 +334,9 @@ PRIVATE int parse_arguments(int argc, char **argv)
} }
else if (strcmp(argv[i], ARG_DEVSTYLE)==0) { else if (strcmp(argv[i], ARG_DEVSTYLE)==0) {
char* dev_style_keys[] = { "STYLE_DEV", "STYLE_DEVA", "STYLE_TTY", char* dev_style_keys[] = { "STYLE_DEV", "STYLE_DEVA", "STYLE_TTY",
"STYLE_CTTY", "STYLE_CLONE", NULL }; "STYLE_CTTY", "STYLE_CLONE", "STYLE_CLONE_A", NULL };
int dev_style_values[] = { STYLE_DEV, STYLE_DEVA, STYLE_TTY, int dev_style_values[] = { STYLE_DEV, STYLE_DEVA, STYLE_TTY,
STYLE_CTTY, STYLE_CLONE }; STYLE_CTTY, STYLE_CLONE, STYLE_CLONE_A };
for(j=0;dev_style_keys[j]!=NULL;j++) { for(j=0;dev_style_keys[j]!=NULL;j++) {
if(!strcmp(dev_style_keys[j], argv[i+1])) { if(!strcmp(dev_style_keys[j], argv[i+1])) {
break; break;

View file

@ -217,6 +217,7 @@
#define DEV_CLOSE_REPL (DEV_RS_BASE + 6) /* reply to DEV_CLOSE */ #define DEV_CLOSE_REPL (DEV_RS_BASE + 6) /* reply to DEV_CLOSE */
#define DEV_SEL_REPL1 (DEV_RS_BASE + 7) /* first reply to DEV_SELECT */ #define DEV_SEL_REPL1 (DEV_RS_BASE + 7) /* first reply to DEV_SELECT */
#define DEV_SEL_REPL2 (DEV_RS_BASE + 8) /* (opt) second reply to DEV_SELECT */ #define DEV_SEL_REPL2 (DEV_RS_BASE + 8) /* (opt) second reply to DEV_SELECT */
#define DEV_OPEN_REPL (DEV_RS_BASE + 9) /* reply to DEV_OPEN */
#define IS_DEV_RS(type) (((type) & ~0xff) == DEV_RS_BASE) #define IS_DEV_RS(type) (((type) & ~0xff) == DEV_RS_BASE)

View file

@ -5,8 +5,8 @@
#include <minix/ipc.h> #include <minix/ipc.h>
enum dev_style { STYLE_NDEV, STYLE_DEV, STYLE_DEVA, STYLE_TTY, STYLE_CTTY, enum dev_style { STYLE_NDEV, STYLE_DEV, STYLE_DEVA, STYLE_TTY, STYLE_CTTY,
STYLE_CLONE }; STYLE_CLONE, STYLE_CLONE_A };
#define IS_DEV_STYLE(s) (s>=STYLE_NDEV && s<=STYLE_CLONE) #define IS_DEV_STYLE(s) (s>=STYLE_NDEV && s<=STYLE_CLONE_A)
/*===========================================================================* /*===========================================================================*
* Major and minor device numbers * * Major and minor device numbers *

View file

@ -76,6 +76,7 @@ PRIVATE char * dmap_style(int dev_style)
case STYLE_TTY: strcpy(str, "STYLE_TTY"); break; case STYLE_TTY: strcpy(str, "STYLE_TTY"); break;
case STYLE_CTTY: strcpy(str, "STYLE_CTTY"); break; case STYLE_CTTY: strcpy(str, "STYLE_CTTY"); break;
case STYLE_CLONE: strcpy(str, "STYLE_CLONE"); break; case STYLE_CLONE: strcpy(str, "STYLE_CLONE"); break;
case STYLE_CLONE_A: strcpy(str, "STYLE_CLONE_A"); break;
default: strcpy(str, "UNKNOWN"); break; default: strcpy(str, "UNKNOWN"); break;
} }

View file

@ -48,7 +48,7 @@ PUBLIC struct boot_image_dev boot_image_dev_table[] = {
{ TTY_PROC_NR, SRV_DF, TTY_MAJOR, STYLE_TTY, STYLE_CTTY }, { TTY_PROC_NR, SRV_DF, TTY_MAJOR, STYLE_TTY, STYLE_CTTY },
{ MEM_PROC_NR, SRV_DF, MEMORY_MAJOR, STYLE_DEV, STYLE_NDEV }, { MEM_PROC_NR, SRV_DF, MEMORY_MAJOR, STYLE_DEV, STYLE_NDEV },
{ LOG_PROC_NR, SRV_DF, LOG_MAJOR, STYLE_DEVA, STYLE_NDEV }, { LOG_PROC_NR, SRV_DF, LOG_MAJOR, STYLE_DEVA, STYLE_NDEV },
{ PFS_PROC_NR, SRV_DF, UDS_MAJOR, STYLE_CLONE,STYLE_NDEV }, { PFS_PROC_NR, SRV_DF, UDS_MAJOR, STYLE_CLONE_A,STYLE_NDEV },
{ DEFAULT_BOOT_NR, SRV_DF, 0, STYLE_NDEV, STYLE_NDEV } /* default { DEFAULT_BOOT_NR, SRV_DF, 0, STYLE_NDEV, STYLE_NDEV } /* default
* entry * entry
*/ */

View file

@ -143,6 +143,7 @@ int flags; /* device flags */
dp->dmap_io = ctty_io; dp->dmap_io = ctty_io;
break; break;
case STYLE_CLONE: case STYLE_CLONE:
case STYLE_CLONE_A:
dp->dmap_opcl = clone_opcl; dp->dmap_opcl = clone_opcl;
dp->dmap_io = gen_io; dp->dmap_io = gen_io;
break; break;