Changeset 721d3a27 in mainline


Ignore:
Timestamp:
2009-01-22T07:39:43Z (16 years ago)
Author:
Tim Post <echo@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
fc11b8a
Parents:
491af07
Message:

exit should be a builtin, since it will eventually need to know about running jobs

Location:
uspace/app/bdsh
Files:
1 added
1 deleted
3 edited
3 moved

Legend:

Unmodified
Added
Removed
  • uspace/app/bdsh/Makefile

    r491af07 r721d3a27  
    5858        cmds/modules/ \
    5959        cmds/modules/help/ \
    60         cmds/modules/quit/ \
    6160        cmds/modules/mkdir/ \
    6261        cmds/modules/rm/ \
     
    6867        cmds/modules/cp/ \
    6968        cmds/builtins/ \
     69        cmds/builtins/exit/\
    7070        cmds/builtins/cd/
    7171
    7272SOURCES = \
    7373        cmds/modules/help/help.c \
    74         cmds/modules/quit/quit.c \
    7574        cmds/modules/mkdir/mkdir.c \
    7675        cmds/modules/rm/rm.c \
     
    8180        cmds/modules/sleep/sleep.c \
    8281        cmds/modules/cp/cp.c \
     82        cmds/builtins/exit/exit.c \
    8383        cmds/builtins/cd/cd.c \
    8484        cmds/mod_cmds.c \
  • uspace/app/bdsh/cmds/builtins/builtins.h

    r491af07 r721d3a27  
    55
    66#include "cd/entry.h"
     7#include "exit/entry.h"
    78
    89builtin_t builtins[] = {
    910#include "cd/cd_def.h"
     11#include "exit/exit_def.h"
    1012        {NULL, NULL, NULL, NULL}
    1113};
  • uspace/app/bdsh/cmds/builtins/exit/exit.c

    r491af07 r721d3a27  
    3232#include <stdlib.h>
    3333#include "entry.h"
    34 #include "quit.h"
     34#include "exit.h"
    3535#include "cmds.h"
    3636
    37 static char *cmdname = "exit";
     37static const char *cmdname = "exit";
    3838
    3939extern volatile unsigned int cli_quit;
    4040extern const char *progname;
    4141
    42 void help_cmd_quit(unsigned int level)
     42void help_cmd_exit(unsigned int level)
    4343{
    4444        printf("Type `%s' to exit %s\n", cmdname, progname);
     
    4848/* Quits the program and returns the status of whatever command
    4949 * came before invoking 'quit' */
    50 int cmd_quit(char *argv[])
     50int cmd_exit(char *argv[], cliuser_t *usr)
    5151{
    5252        /* Inform that we're outta here */
  • uspace/app/bdsh/cmds/builtins/exit/exit.h

    r491af07 r721d3a27  
    1 #ifndef QUIT_H
    2 #define QUIT_H
     1#ifndef EXIT_H
     2#define EXIT_H
    33
    44/* Prototypes for the quit command (excluding entry points) */
  • uspace/app/bdsh/cmds/builtins/exit/exit_def.h

    r491af07 r721d3a27  
    22        "exit",
    33        "Exit the shell",
    4         &cmd_quit,
    5         &help_cmd_quit,
     4        &cmd_exit,
     5        &help_cmd_exit,
    66},
  • uspace/app/bdsh/cmds/modules/modules.h

    r491af07 r721d3a27  
    1919
    2020#include "help/entry.h"
    21 #include "quit/entry.h"
    2221#include "mkdir/entry.h"
    2322#include "rm/entry.h"
     
    3534module_t modules[] = {
    3635#include "help/help_def.h"
    37 #include "quit/quit_def.h"
    3836#include "mkdir/mkdir_def.h"
    3937#include "rm/rm_def.h"
Note: See TracChangeset for help on using the changeset viewer.