summaryrefslogtreecommitdiff
path: root/util-linux
diff options
context:
space:
mode:
authorGlenn L McGrath <bug1@ihug.co.nz>2004-02-22 11:35:13 +0000
committerGlenn L McGrath <bug1@ihug.co.nz>2004-02-22 11:35:13 +0000
commit15a4f1ee50f61cecd84cc95c38e1185faa81c03c (patch)
tree98e29e07b2695ece51c8e394b54d04995995ecc5 /util-linux
parentdf7d84cf252a9443f748d8cef3821c7230ab54b4 (diff)
downloadbusybox-w32-15a4f1ee50f61cecd84cc95c38e1185faa81c03c.tar.gz
busybox-w32-15a4f1ee50f61cecd84cc95c38e1185faa81c03c.tar.bz2
busybox-w32-15a4f1ee50f61cecd84cc95c38e1185faa81c03c.zip
Patch from Chris Larson (kergoth), to allow multiple directores to be
unmounted at once.
Diffstat (limited to 'util-linux')
-rw-r--r--util-linux/umount.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/util-linux/umount.c b/util-linux/umount.c
index 863d52476..5df597028 100644
--- a/util-linux/umount.c
+++ b/util-linux/umount.c
@@ -238,7 +238,7 @@ static int umount_all(void)
238 238
239extern int umount_main(int argc, char **argv) 239extern int umount_main(int argc, char **argv)
240{ 240{
241 char path[PATH_MAX]; 241 char path[PATH_MAX], result = 0;
242 242
243 if (argc < 2) { 243 if (argc < 2) {
244 bb_show_usage(); 244 bb_show_usage();
@@ -286,10 +286,13 @@ extern int umount_main(int argc, char **argv)
286 else 286 else
287 return EXIT_FAILURE; 287 return EXIT_FAILURE;
288 } 288 }
289 if (realpath(*argv, path) == NULL)
290 bb_perror_msg_and_die("%s", path);
291 if (do_umount(path))
292 return EXIT_SUCCESS;
293 bb_perror_msg_and_die("%s", *argv);
294}
295 289
290 do {
291 if (realpath(*argv, path) != NULL)
292 if (do_umount(path))
293 continue;
294 bb_perror_msg("%s", path);
295 result++;
296 } while (--argc > 0 && ++argv);
297 return result;
298}