diff options
| author | Denis Vlasenko <vda.linux@googlemail.com> | 2006-09-17 16:28:10 +0000 |
|---|---|---|
| committer | Denis Vlasenko <vda.linux@googlemail.com> | 2006-09-17 16:28:10 +0000 |
| commit | 9213a9e0f2d8fd638ecd02e2628d96dd5c7d233e (patch) | |
| tree | 94c3c0678d1349497abe2db6004e9331e50f6d37 /shell | |
| parent | a6127aacef047ed7661722705b052811fbe7f467 (diff) | |
| download | busybox-w32-9213a9e0f2d8fd638ecd02e2628d96dd5c7d233e.tar.gz busybox-w32-9213a9e0f2d8fd638ecd02e2628d96dd5c7d233e.tar.bz2 busybox-w32-9213a9e0f2d8fd638ecd02e2628d96dd5c7d233e.zip | |
whitespace cleanup
Diffstat (limited to 'shell')
| -rw-r--r-- | shell/bbsh.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/shell/bbsh.c b/shell/bbsh.c index 2194bdad6..05ae1637e 100644 --- a/shell/bbsh.c +++ b/shell/bbsh.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* vi: set ts=4 : | 1 | /* vi: set ts=4 : |
| 2 | * | 2 | * |
| 3 | * bbsh - busybox shell | 3 | * bbsh - busybox shell |
| 4 | * | 4 | * |
| 5 | * Copyright 2006 Rob Landley <rob@landley.net> | 5 | * Copyright 2006 Rob Landley <rob@landley.net> |
| @@ -51,7 +51,7 @@ | |||
| 51 | // What we know about a single process. | 51 | // What we know about a single process. |
| 52 | struct command { | 52 | struct command { |
| 53 | struct command *next; | 53 | struct command *next; |
| 54 | int flags; // exit, suspend, && || | 54 | int flags; // exit, suspend, && || |
| 55 | int pid; // pid (or exit code) | 55 | int pid; // pid (or exit code) |
| 56 | int argc; | 56 | int argc; |
| 57 | char *argv[0]; | 57 | char *argv[0]; |
| @@ -125,9 +125,9 @@ static char *parse_pipeline(char *cmdline, struct pipeline *line) | |||
| 125 | return 0; | 125 | return 0; |
| 126 | } | 126 | } |
| 127 | 127 | ||
| 128 | // Allocate next command structure if necessary | 128 | // Allocate next command structure if necessary |
| 129 | if (!*cmd) *cmd = xzalloc(sizeof(struct command)+8*sizeof(char *)); | 129 | if (!*cmd) *cmd = xzalloc(sizeof(struct command)+8*sizeof(char *)); |
| 130 | 130 | ||
| 131 | // Parse next argument and add the results to argv[] | 131 | // Parse next argument and add the results to argv[] |
| 132 | end = parse_word(start, cmd); | 132 | end = parse_word(start, cmd); |
| 133 | 133 | ||
| @@ -138,7 +138,7 @@ static char *parse_pipeline(char *cmdline, struct pipeline *line) | |||
| 138 | start++; | 138 | start++; |
| 139 | break; | 139 | break; |
| 140 | } | 140 | } |
| 141 | // handle | & < > >> << || && | 141 | // handle | & < > >> << || && |
| 142 | } | 142 | } |
| 143 | break; | 143 | break; |
| 144 | } | 144 | } |
| @@ -160,7 +160,7 @@ static int run_pipeline(struct pipeline *line) | |||
| 160 | if (cmd->argc==2 && !strcmp(cmd->argv[0],"cd")) | 160 | if (cmd->argc==2 && !strcmp(cmd->argv[0],"cd")) |
| 161 | chdir(cmd->argv[1]); | 161 | chdir(cmd->argv[1]); |
| 162 | else if(!strcmp(cmd->argv[0],"exit")) | 162 | else if(!strcmp(cmd->argv[0],"exit")) |
| 163 | exit(cmd->argc>1 ? atoi(cmd->argv[1]) : 0); | 163 | exit(cmd->argc>1 ? atoi(cmd->argv[1]) : 0); |
| 164 | else { | 164 | else { |
| 165 | int status; | 165 | int status; |
| 166 | pid_t pid=fork(); | 166 | pid_t pid=fork(); |
| @@ -217,6 +217,6 @@ int bbsh_main(int argc, char *argv[]) | |||
| 217 | } | 217 | } |
| 218 | if (ENABLE_FEATURE_CLEAN_UP) free(command); | 218 | if (ENABLE_FEATURE_CLEAN_UP) free(command); |
| 219 | } | 219 | } |
| 220 | 220 | ||
| 221 | return 1; | 221 | return 1; |
| 222 | } | 222 | } |
