Makes mount slightly more useful
authorBarret Rhoden <brho@cs.berkeley.edu>
Wed, 29 Jan 2014 19:56:50 +0000 (11:56 -0800)
committerBarret Rhoden <brho@cs.berkeley.edu>
Wed, 29 Jan 2014 19:56:50 +0000 (11:56 -0800)
Couldn't pass more than one flag (e.g. -a and -c).

kern/kfs/root
tests/mount.c

index 231e6bd..2bb7b47 100755 (executable)
@@ -35,5 +35,5 @@ else
        exit
 fi
 
-mount -c /srv/$SRVNAME /mnt
+mount -a -c /srv/$SRVNAME /mnt
 ls /mnt
index c0f5fd8..457f268 100644 (file)
@@ -16,13 +16,13 @@ int main(int argc, char *argv[])
        int flag = 0;
        /* crap arg handling for now. */
        argc--,argv++;
-       if (argc > 2){
+       while (argc > 2){
                switch(argv[0][1]){
-                       case 'b': flag = 1;
+                       case 'b': flag |= 1;
                        break;
-                       case 'a': flag = 2;
+                       case 'a': flag |= 2;
                        break;
-                       case 'c': flag = 4;
+                       case 'c': flag |= 4;
                        break;
                        default: 
                                printf("-a or -b and/or -c for now\n");