[BusyBox-cvs] busybox/util-linux umount.c,1.62,1.63

Glenn McGrath bug1 at busybox.net
Sun Feb 22 11:35:16 UTC 2004


Update of /var/cvs/busybox/util-linux
In directory nail:/tmp/cvs-serv2604/util-linux

Modified Files:
	umount.c 
Log Message:
Patch from Chris Larson (kergoth), to allow multiple directores to be 
unmounted at once.


Index: umount.c
===================================================================
RCS file: /var/cvs/busybox/util-linux/umount.c,v
retrieving revision 1.62
retrieving revision 1.63
diff -u -d -r1.62 -r1.63
--- a/umount.c	14 Jul 2003 21:21:08 -0000	1.62
+++ b/umount.c	22 Feb 2004 11:35:13 -0000	1.63
@@ -238,7 +238,7 @@
 
 extern int umount_main(int argc, char **argv)
 {
-	char path[PATH_MAX];
+	char path[PATH_MAX], result = 0;
 
 	if (argc < 2) {
 		bb_show_usage();
@@ -286,10 +286,13 @@
 		else
 			return EXIT_FAILURE;
 	}
-	if (realpath(*argv, path) == NULL)
-		bb_perror_msg_and_die("%s", path);
-	if (do_umount(path))
-		return EXIT_SUCCESS;
-	bb_perror_msg_and_die("%s", *argv);
-}
 
+	do {
+		if (realpath(*argv, path) != NULL)
+			if (do_umount(path))
+				continue;
+		bb_perror_msg("%s", path);
+		result++;
+	} while (--argc > 0 && ++argv);
+	return result;
+}




More information about the busybox-cvs mailing list