aboutsummaryrefslogtreecommitdiff
path: root/toys
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2006-11-25 13:34:51 -0500
committerRob Landley <rob@landley.net>2006-11-25 13:34:51 -0500
commit58c6c1be60d96df4b7cb8d77625948b0da297144 (patch)
treefecf653c1fefbc45e5ad534f4e77866122d8eaa1 /toys
parentf06af2bef5fe73c4ff50ed177fab244ed9db9182 (diff)
downloadtoybox-58c6c1be60d96df4b7cb8d77625948b0da297144.tar.gz
More work on option parsing. "df -t tmpfs" actually seems to work now.
Diffstat (limited to 'toys')
-rw-r--r--toys/df.c9
-rw-r--r--toys/toylist.h2
2 files changed, 6 insertions, 5 deletions
diff --git a/toys/df.c b/toys/df.c
index 375aa0ab..3e8a9725 100644
--- a/toys/df.c
+++ b/toys/df.c
@@ -21,11 +21,12 @@ static void show_mt(struct mtab_list *mt)
// If we have -t, skip other filesystem types
if (toy.df.fstype) {
- struct string_list *sl;
+ struct arg_list *al;
- for (sl = toy.df.fstype; sl; sl = sl->next)
- if (!strcmp(mt->type, sl->str)) break;
- if (!sl) return;
+ for (al = toy.df.fstype; al; al = al->next) {
+ if (!strcmp(mt->type, al->arg)) break;
+ }
+ if (!al) return;
}
// If we don't have -a, skip synthetic filesystems
diff --git a/toys/toylist.h b/toys/toylist.h
index a0eef1c1..ad749cd2 100644
--- a/toys/toylist.h
+++ b/toys/toylist.h
@@ -54,7 +54,7 @@ NEWTOY(toybox, NULL, 0)
// The rest of these are alphabetical, for binary search.
USE_TOYSH(NEWTOY(cd, NULL, TOYFLAG_NOFORK))
-USE_DF(NEWTOY(df, "Pkt:a", TOYFLAG_USR|TOYFLAG_SBIN))
+USE_DF(NEWTOY(df, "Pkt*a", TOYFLAG_USR|TOYFLAG_SBIN))
USE_TOYSH(NEWTOY(exit, NULL, TOYFLAG_NOFORK))
USE_HELLO(NEWTOY(hello, NULL, TOYFLAG_NOFORK|TOYFLAG_USR))
USE_PWD(NEWTOY(pwd, NULL, TOYFLAG_BIN))