diff toys/df.c @ 32:993eab821bd5

More work on option parsing. "df -t tmpfs" actually seems to work now.
author Rob Landley <rob@landley.net>
date Sat, 25 Nov 2006 13:34:51 -0500
parents c471910a14e4
children 7c77c6ec17ee
line wrap: on
line diff
--- a/toys/df.c	Sat Nov 25 13:32:01 2006 -0500
+++ b/toys/df.c	Sat Nov 25 13:34:51 2006 -0500
@@ -21,11 +21,12 @@
 
 	// 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