Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 3301 → Rev 3302

/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}
};