[Libsysio-commit] namespace_assembly: libsysio/src command.c parser.c
Brought to you by:
lward
|
From: Sonja T. <so...@us...> - 2004-01-12 15:50:12
|
Update of /cvsroot/libsysio/libsysio/src
In directory sc8-pr-cvs1:/tmp/cvs-serv3742/src
Modified Files:
Tag: namespace_assembly
command.c parser.c
Log Message:
Removed init command from namespace assembly. Added header file.
Index: command.c
===================================================================
RCS file: /cvsroot/libsysio/libsysio/src/Attic/command.c,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -w -b -B -p -r1.1.2.1 -r1.1.2.2
--- command.c 18 Dec 2003 18:44:02 -0000 1.1.2.1
+++ command.c 12 Jan 2004 15:50:08 -0000 1.1.2.2
@@ -12,13 +12,6 @@
#define MAXDRIVERSIZE 100 /* Maximum size for a driver name */
-/*
- * REVISIT:
- * There should probably be some form of #define around this..
- */
-#include "../drivers/native/fs_native.h"
-#include "../drivers/incore/fs_incore.h"
-
#define SYSIO_MKDEV(major, minor) \
((((major) & 0xff) << 8) | ((minor) & 0xff))
@@ -64,43 +57,6 @@ static char *get_arg(char *arg, char** p
return NULL;
}
-struct init_function_t {
- char *driverName;
- int (*initFunc)();
-};
-
-struct init_function_t init_funcs[] = {
- {"native", _sysio_native_init},
- {"incore", _sysio_incore_init},
-#ifdef CPLANT_YOD
- {"yod", _sysio_yod_init},
-#endif
- {NULL, NULL}
-};
-
-int do_init(struct arg_list *args)
-{
- int i;
- char *prefix[] = {"dn", NULL};
- char *driverName;
-
- /* Must be exactly one argument */
- if ((args == NULL) || (args->next != NULL)) {
- return EINVAL;
- }
-
- /* Extract the driver from the argument */
- driverName = get_arg(args->arg, prefix, NULL);
-
- for (i=0; init_funcs[i].driverName != NULL; i++) {
-
- if (strcmp(init_funcs[i].driverName, driverName) == 0)
- return (init_funcs[i].initFunc)();
- }
-
- return EINVAL;
-}
-
static int get_perms(char *perms)
{
int total, i, j, digit;
@@ -445,7 +401,6 @@ int do_chmod(struct arg_list *args) {
}
struct command_function_t cmd_funcs[] = {
- {"init", do_init},
{"creat", do_creat},
{"mnt", do_mnt},
{"cd", do_cd},
Index: parser.c
===================================================================
RCS file: /cvsroot/libsysio/libsysio/src/Attic/parser.c,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -w -b -B -p -r1.1.2.1 -r1.1.2.2
--- parser.c 18 Dec 2003 18:44:02 -0000 1.1.2.1
+++ parser.c 12 Jan 2004 15:50:08 -0000 1.1.2.2
@@ -237,9 +237,6 @@ int run_cmds(char *buf)
char *cmdStr = buf;
int err;
- /* Initilize sysio first */
- _sysio_init();
-
while (1) {
cmd = (struct command_t *)malloc(sizeof(struct command_t));
|