/branches/shell/uspace/app/bdsh/cmds/modules/mount/mount.def |
---|
0,0 → 1,8 |
{ |
"mount", |
"The mount command", |
&cmd_mount, |
&help_cmd_mount, |
0 |
}, |
/branches/shell/uspace/app/bdsh/cmds/modules/mount/mount.c |
---|
0,0 → 1,51 |
/* Automatically generated by mknewcmd on Tue Aug 12 15:40:47 PHT 2008 |
* This is machine generated output. The author of mknewcmd claims no |
* copyright over the contents of this file. Where legally permitted, the |
* contents herein are donated to the public domain. |
* |
* You should apply any license and copyright that you wish to this file, |
* replacing this header in its entirety. */ |
#include <stdio.h> |
#include <stdlib.h> |
#include "config.h" |
#include "util.h" |
#include "errors.h" |
#include "entry.h" |
#include "mount.h" |
#include "cmds.h" |
static char *cmdname = "mount"; |
/* Dispays help for mount in various levels */ |
void * help_cmd_mount(unsigned int level) |
{ |
printf("This is the %s help for '%s'.\n", |
level ? EXT_HELP : SHORT_HELP, cmdname); |
return CMD_VOID; |
} |
/* Main entry point for mount, accepts an array of arguments */ |
int * cmd_mount(char **argv) |
{ |
unsigned int argc; |
unsigned int i; |
/* Count the arguments */ |
for (argc = 0; argv[argc] != NULL; argc ++); |
printf("%s %s\n", TEST_ANNOUNCE, cmdname); |
printf("%d arguments passed to %s", argc - 1, cmdname); |
if (argc < 2) { |
printf("\n"); |
return CMD_SUCCESS; |
} |
printf(":\n"); |
for (i = 1; i < argc; i++) |
printf("[%d] -> %s\n", i, argv[i]); |
return CMD_SUCCESS; |
} |
/branches/shell/uspace/app/bdsh/cmds/modules/mount/entry.h |
---|
0,0 → 1,9 |
#ifndef MOUNT_ENTRY_H |
#define MOUNT_ENTRY_H |
/* Entry points for the mount command */ |
extern int * cmd_mount(char **); |
extern void * help_cmd_mount(unsigned int); |
#endif /* MOUNT_ENTRY_H */ |
/branches/shell/uspace/app/bdsh/cmds/modules/mount/mount.h |
---|
0,0 → 1,8 |
#ifndef MOUNT_H |
#define MOUNT_H |
/* Prototypes for the mount command, excluding entry points */ |
#endif /* MOUNT_H */ |
/branches/shell/uspace/app/bdsh/cmds/modules/modules.h |
---|
24,6 → 24,7 |
#include "cat/entry.h" |
#include "touch/entry.h" |
#include "ls/entry.h" |
#include "mount/entry.h" |
/* Each .def function fills the module_t struct with the individual name, entry |
* point, help entry point, etc. You can use config.h to control what modules |
37,6 → 38,7 |
#include "cat/cat.def" |
#include "touch/touch.def" |
#include "ls/ls.def" |
#include "mount/mount.def" |
{NULL, NULL, NULL, NULL} |
}; |
/branches/shell/uspace/app/bdsh/Makefile |
---|
63,6 → 63,7 |
cmds/modules/cat/ \ |
cmds/modules/touch/ \ |
cmds/modules/ls/ \ |
cmds/modules/mount/ \ |
cmds/builtins/ \ |
cmds/builtins/pwd/ \ |
cmds/builtins/cd/ \ |
76,6 → 77,7 |
cmds/modules/cat/cat.c \ |
cmds/modules/touch/touch.c \ |
cmds/modules/ls/ls.c \ |
cmds/modules/mount/mount.c \ |
cmds/builtins/pwd/pwd.c \ |
cmds/builtins/cd/cd.c \ |
cmds/mod_cmds.c \ |