From dc640259adff6007d195fd4cc78dcf9829e5e6ee Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Thu, 29 May 2014 05:22:02 -0500 Subject: 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. --- lib/lib.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/lib.h') diff --git a/lib/lib.h b/lib/lib.h index bbb1488d..09af2837 100644 --- a/lib/lib.h +++ b/lib/lib.h @@ -31,6 +31,7 @@ void *llist_pop(void *list); // actually void **list void *dlist_pop(void *list); // actually struct double_list **list void dlist_add_nomalloc(struct double_list **list, struct double_list *new); struct double_list *dlist_add(struct double_list **list, char *data); +void *dlist_terminate(void *list); // args.c void get_optflags(void); @@ -162,7 +163,7 @@ int xsocket(int domain, int type, int protocol); // getmountlist.c struct mtab_list { - struct mtab_list *next; + struct mtab_list *next, *prev; struct stat stat; struct statvfs statvfs; char *dir; -- cgit v1.2.3