aboutsummaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorvda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277>2007-01-11 17:20:00 +0000
committervda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277>2007-01-11 17:20:00 +0000
commit8bcd78dd99c17ea33daf8fb670dc9489cb24168f (patch)
treeaf4e797eef0a65f4e3dba94b325da0ec08452d36 /shell
parenteac7a041006fbc2b18d2bbf26547d0780369fa5e (diff)
downloadbusybox-w32-8bcd78dd99c17ea33daf8fb670dc9489cb24168f.tar.gz
busybox-w32-8bcd78dd99c17ea33daf8fb670dc9489cb24168f.tar.bz2
busybox-w32-8bcd78dd99c17ea33daf8fb670dc9489cb24168f.zip
Trailing whitespace removal over entire tree
git-svn-id: svn://busybox.net/trunk/busybox@17252 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'shell')
-rw-r--r--shell/ash.c4
-rw-r--r--shell/bbsh.c14
2 files changed, 9 insertions, 9 deletions
diff --git a/shell/ash.c b/shell/ash.c
index 10217fe2f..95928e992 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -2036,7 +2036,7 @@ static int is_safe_applet(char *name)
2036{ 2036{
2037 /* It isn't a bug to have non-existent applet here... */ 2037 /* It isn't a bug to have non-existent applet here... */
2038 /* ...just a waste of space... */ 2038 /* ...just a waste of space... */
2039 static const char safe_applets[][8] = { 2039 static const char safe_applets[][8] = {
2040 "[" 2040 "["
2041 USE_AWK (, "awk" ) 2041 USE_AWK (, "awk" )
2042 USE_CAT (, "cat" ) 2042 USE_CAT (, "cat" )
@@ -3763,7 +3763,7 @@ tryexec(char *cmd, char **argv, char **envp)
3763 struct BB_applet *a; 3763 struct BB_applet *a;
3764 int argc = 0; 3764 int argc = 0;
3765 char **c; 3765 char **c;
3766 3766
3767 if (strchr(cmd, '/') == NULL 3767 if (strchr(cmd, '/') == NULL
3768 && (a = find_applet_by_name(cmd)) != NULL 3768 && (a = find_applet_by_name(cmd)) != NULL
3769 && is_safe_applet(cmd) 3769 && is_safe_applet(cmd)
diff --git a/shell/bbsh.c b/shell/bbsh.c
index 99e4f61fb..7978fdc16 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.
52struct command { 52struct 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}