diff options
author | Rob Landley <rob@landley.net> | 2014-05-29 05:22:02 -0500 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2014-05-29 05:22:02 -0500 |
commit | dc640259adff6007d195fd4cc78dcf9829e5e6ee (patch) | |
tree | 97ab6eb6abb286a3d612b8aa86646cf655b1a1cf /toys/lsb | |
parent | 55e9f35223e40f455b80671f25b412072d9af678 (diff) | |
download | toybox-dc640259adff6007d195fd4cc78dcf9829e5e6ee.tar.gz |
Switch mtab_list to doubly linked so we can traverse in either order. Convert umount and df. Add dlist_terminate() to break lists for traversal in either direction.
Diffstat (limited to 'toys/lsb')
-rw-r--r-- | toys/lsb/umount.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/toys/lsb/umount.c b/toys/lsb/umount.c index cc40f144..d1a2c69d 100644 --- a/toys/lsb/umount.c +++ b/toys/lsb/umount.c @@ -119,7 +119,10 @@ void umount_main(void) if (TT.t) arg_comma_collate(&typestr, TT.t); // Loop through mounted filesystems - for (mlsave = ml = xgetmountlist(0); ml; ml = ml->next) { + mlsave = xgetmountlist(0); + ml = ml->prev; + + for (ml = dlist_terminate(mlsave); ml; ml = ml->prev) { if (TT.t) { char *type, *types = typestr; int len, skip = strncmp(types, "no", 2); |