Reversed the order in which filesystems are unmounted for umount -a,
authorChristoph Robitschko <chmr@edvz.tu-graz.ac.at>
Fri, 15 Oct 1993 13:39:12 +0000 (13:39 +0000)
committerChristoph Robitschko <chmr@edvz.tu-graz.ac.at>
Fri, 15 Oct 1993 13:39:12 +0000 (13:39 +0000)
recursive mounts work now.

sbin/umount/umount.c

index c788719..8f3a6a2 100644 (file)
@@ -157,7 +157,7 @@ umountall(typelist)
                fprintf(stderr, "umount: cannot get mount information.\n");
                exit(1);
        }
                fprintf(stderr, "umount: cannot get mount information.\n");
                exit(1);
        }
-       for (i=errors=0; i< mntsize; i++) {
+       for (errors = 0, i = mntsize - 1; i >= 0; i--) {
                if (badtype(mntbuf[i].f_type, typelist) ||
                    (strcmp(mntbuf[i].f_mntonname, "/") == 0))
                        continue;
                if (badtype(mntbuf[i].f_type, typelist) ||
                    (strcmp(mntbuf[i].f_mntonname, "/") == 0))
                        continue;