Patch from Chris Larson (kergoth), to allow multiple directores to be
unmounted at once.
This commit is contained in:
parent
df7d84cf25
commit
15a4f1ee50
@ -3441,7 +3441,7 @@
|
|||||||
<title>umount</title>
|
<title>umount</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Usage: umount [OPTION]... DEVICE|DIRECTORY
|
Usage: umount [OPTION]... DEVICE|DIRECTORY [...]
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
|
@ -238,7 +238,7 @@ static int umount_all(void)
|
|||||||
|
|
||||||
extern int umount_main(int argc, char **argv)
|
extern int umount_main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
char path[PATH_MAX];
|
char path[PATH_MAX], result = 0;
|
||||||
|
|
||||||
if (argc < 2) {
|
if (argc < 2) {
|
||||||
bb_show_usage();
|
bb_show_usage();
|
||||||
@ -286,10 +286,13 @@ extern int umount_main(int argc, char **argv)
|
|||||||
else
|
else
|
||||||
return EXIT_FAILURE;
|
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;
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user