]> git.ipfire.org Git - thirdparty/util-linux.git/commit
losetup: keep -f and <devname> mutually exclusive
authorKarel Zak <kzak@redhat.com>
Thu, 7 Jun 2018 10:05:08 +0000 (12:05 +0200)
committerKarel Zak <kzak@redhat.com>
Thu, 7 Jun 2018 10:05:08 +0000 (12:05 +0200)
commitc3f5a0f1d47dbc47f6d21da232d4eb1cfb7905db
tree7d4b9384dc5b5e3d01db4a589b744bf00e1e5898
parent2c4d86abdadab19be76abecb156da7f7dc284d81
losetup: keep -f and <devname> mutually exclusive

losetup tries to blindly use specified device as well as search for
the first free device, the result is:

 # losetup /dev/loop1 -f /tmp/tfile_loop1
 losetup: /dev/loop1: failed to set up loop device: Invalid argument

fixed version:

 # losetup /dev/loop10 -f img
 losetup: unexpected arguments

Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1566432
Signed-off-by: Karel Zak <kzak@redhat.com>
sys-utils/losetup.c