diff options
author | Karel Zak | 2019-01-18 12:13:12 +0100 |
---|---|---|
committer | Karel Zak | 2019-01-18 12:13:12 +0100 |
commit | 6daf185c3cc2b7c4b85f8dd39c9caaab5caea434 (patch) | |
tree | 8b4e1b0c65d55c093d8e68448ec13a42e0dd6d1f /disk-utils | |
parent | libfdisk: add comment to fdisk_set_first_lba() (diff) | |
download | kernel-qcow2-util-linux-6daf185c3cc2b7c4b85f8dd39c9caaab5caea434.tar.gz kernel-qcow2-util-linux-6daf185c3cc2b7c4b85f8dd39c9caaab5caea434.tar.xz kernel-qcow2-util-linux-6daf185c3cc2b7c4b85f8dd39c9caaab5caea434.zip |
losetup: use offset in warn_size() calculation
# dd if=/dev/urandom of=dummy bs=513 count=1 2>/dev/null
# losetup -f --show --offset 1 dummy
/dev/loop0
losetup: dummy: Warning: file does not fit into a 512-byte sector; the end of the file will be ignore
The warning is bogus as with offset the size of the file fits into
512-byte sector. Simple test that all is right:
# dd if=dummy bs=1 skip=1 2>/dev/null | sha256sum - /dev/loop0
da2ed0ade6ea518a802cd8a7a3c01c408ad8699ef6856b0b01f92b867d4ba9b5 -
da2ed0ade6ea518a802cd8a7a3c01c408ad8699ef6856b0b01f92b867d4ba9b5 /dev/loop0
Addresses: https://github.com/karelzak/util-linux/issues/722
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'disk-utils')
0 files changed, 0 insertions, 0 deletions