aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/busybox.sgml2
-rw-r--r--util-linux/umount.c17
2 files changed, 11 insertions, 8 deletions
diff --git a/docs/busybox.sgml b/docs/busybox.sgml
index b54d68ee5..bd8b1697c 100644
--- a/docs/busybox.sgml
+++ b/docs/busybox.sgml
@@ -3441,7 +3441,7 @@
3441 <title>umount</title> 3441 <title>umount</title>
3442 3442
3443 <para> 3443 <para>
3444 Usage: umount [OPTION]... DEVICE|DIRECTORY 3444 Usage: umount [OPTION]... DEVICE|DIRECTORY [...]
3445 </para> 3445 </para>
3446 3446
3447 <para> 3447 <para>
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}