Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 3276 → Rev 3277

/branches/shell/uspace/app/bdsh/cmds/modules/rm/rm.c
0,0 → 1,48
/* Automatically generated by mknewcmd on Mon Aug 11 00:14:56 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 "entry.h"
#include "rm.h"
#include "cmds.h"
 
static char *cmdname = "rm";
 
/* Dispays help for rm in various levels */
void * help_cmd_rm(unsigned int level)
{
printf("This is the %s help for '%s'.\n",
level ? EXT_HELP : SHORT_HELP, cmdname);
return 0;
}
 
/* Main entry point for rm, accepts an array of arguments */
int * cmd_rm(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 0;
}
 
printf(":\n");
for (i = 1; i < argc; i++)
printf("[%d] -> %s\n", i, argv[i]);
 
return 0;
}