aboutsummaryrefslogtreecommitdiff
path: root/util-linux
diff options
context:
space:
mode:
authorbug1 <bug1@69ca8d6d-28ef-0310-b511-8ec308f3f277>2004-02-22 11:35:13 +0000
committerbug1 <bug1@69ca8d6d-28ef-0310-b511-8ec308f3f277>2004-02-22 11:35:13 +0000
commit0514067275f8fef0462dd57fb1b09febed61d112 (patch)
tree98e29e07b2695ece51c8e394b54d04995995ecc5 /util-linux
parentfd69f2cf18a79a027070e9b300f10dd4e718eb17 (diff)
downloadbusybox-w32-0514067275f8fef0462dd57fb1b09febed61d112.tar.gz
busybox-w32-0514067275f8fef0462dd57fb1b09febed61d112.tar.bz2
busybox-w32-0514067275f8fef0462dd57fb1b09febed61d112.zip
Patch from Chris Larson (kergoth), to allow multiple directores to be
unmounted at once. git-svn-id: svn://busybox.net/trunk/busybox@8546 69ca8d6d-28ef-0310-b511-8ec308f3f277
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}