]> git.ipfire.org Git - thirdparty/util-linux.git/commit
losetup: properly use --sector-size when create a new device
authorKarel Zak <kzak@redhat.com>
Tue, 22 Jan 2019 10:50:20 +0000 (11:50 +0100)
committerKarel Zak <kzak@redhat.com>
Tue, 22 Jan 2019 10:50:20 +0000 (11:50 +0100)
commit422f0e9f206a145c59a71333dad20d38cbbfc0c4
tree3f63202271f075dc36b6a7582d633beb39f354f5
parent75d239ffd89b93f79059928e436f1068f402452e
losetup: properly use --sector-size when create a new device

The --partscan functionality depends on sector size. Make sure
sector size is set before we force kernel to scan the device for
partitions. For example:

 losetup -f loopfile --sector-size 4KiB --partscan --show

where 'loopfile' contains GPT with 4096 sectors.

Reported-by: Jeffrey Ferreira <jeffpferreira@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
sys-utils/losetup.8
sys-utils/losetup.c