aboutsummaryrefslogtreecommitdiff
path: root/toys/toysh.c
diff options
context:
space:
mode:
authorlandley <landley@driftwood>2006-10-30 01:38:00 -0500
committerlandley <landley@driftwood>2006-10-30 01:38:00 -0500
commit09ea7ac1a269db3c9a3b76840b37a7cb1eccbc24 (patch)
tree83d36320286fee20f7a7b4cc317f9cc3802926fe /toys/toysh.c
parent2f588f7f47c43b5949e520b80cfd755a6b4ca4e6 (diff)
downloadtoybox-09ea7ac1a269db3c9a3b76840b37a7cb1eccbc24.tar.gz
Implement df. Add -Wall to build and fix up warnings. Add copyright notices.
Add error_msg() and itoa() to library. Remove argc from globals (since argv is null terminated), add optflags to globals.
Diffstat (limited to 'toys/toysh.c')
-rw-r--r--toys/toysh.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/toys/toysh.c b/toys/toysh.c
index 1d792f1f..7ac430c9 100644
--- a/toys/toysh.c
+++ b/toys/toysh.c
@@ -181,14 +181,14 @@ static void handle(char *command)
int cd_main(void)
{
- char *dest = toys.argc>1 ? toys.argv[1] : getenv("HOME");
+ char *dest = toys.argv[1] ? toys.argv[1]: getenv("HOME");
if (chdir(dest)) error_exit("chdir %s",dest);
return 0;
}
int exit_main(void)
{
- exit(toys.argc>1 ? atoi(toys.argv[1]) : 0);
+ exit(toys.argv[1] ? atoi(toys.argv[1]) : 0);
}
int toysh_main(void)