diff options
author | Karel Zak | 2019-06-06 14:52:40 +0200 |
---|---|---|
committer | Karel Zak | 2019-06-06 14:56:48 +0200 |
commit | bf0a0e3e2aad599919536a9e3244686fd4292e10 (patch) | |
tree | a2c516d12d77e367cbbea4d845b64b30bba3b5c2 /sys-utils | |
parent | wall: make sure ut_line is not empty (diff) | |
download | kernel-qcow2-util-linux-bf0a0e3e2aad599919536a9e3244686fd4292e10.tar.gz kernel-qcow2-util-linux-bf0a0e3e2aad599919536a9e3244686fd4292e10.tar.xz kernel-qcow2-util-linux-bf0a0e3e2aad599919536a9e3244686fd4292e10.zip |
umount: be more strict about --all
If you by accident execute
umount ls -al /mnt/
then umount --all is executed and another arguments silently ignored.
It seems better to be more strict in this case.
Reported-by: Harald Dunkel <harald.dunkel@aixigo.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'sys-utils')
-rw-r--r-- | sys-utils/umount.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sys-utils/umount.c b/sys-utils/umount.c index e3734b0ec..397e0ebfc 100644 --- a/sys-utils/umount.c +++ b/sys-utils/umount.c @@ -573,6 +573,10 @@ int main(int argc, char **argv) argv += optind; if (all) { + if (argc) { + warnx(_("unexpected number of arguments")); + errtryhelp(MNT_EX_USAGE); + } if (!types) types = "noproc,nodevfs,nodevpts,nosysfs,norpc_pipefs,nonfsd,noselinuxfs"; |