]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
misc: POSIX usage dd, regarding unit suffixes
authorRuediger Meier <ruediger.meier@ga-group.nl>
Tue, 13 Jun 2017 22:14:13 +0000 (00:14 +0200)
committerKarel Zak <kzak@redhat.com>
Wed, 14 Jun 2017 09:48:22 +0000 (11:48 +0200)
In POSIX we have only 'b' and 'k' (case-sensitive).

In the real work, OSX was the only system I've found  which does
not understand capital 'K'.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
sys-utils/losetup.8
tests/ts/fincore/count
tests/ts/libmount/loop-overlay

index 60e9ff04ff3d8f1e33da6d7a1de14cb420984770..9dab5803759f40ad6511b068e3493caa0863e918 100644 (file)
@@ -179,7 +179,7 @@ loop control device
 The following commands can be used as an example of using the loop device.
 .nf
 .IP
-# dd if=/dev/zero of=~/file.img bs=1MiB count=10
+# dd if=/dev/zero of=~/file.img bs=1024k count=10
 # losetup --find --show ~/file.img
 /dev/loop0
 # mkfs -t ext2 /dev/loop0
index 0151016ee247642482c0495b38ee9cc137578f24..0b6f24dfe63efcc71e2a5e883f27cee87841a045 100755 (executable)
@@ -46,7 +46,7 @@ function check_dd_fs_feat
        touch "$testf"
 
        # NFS seems to fail for direct AND append
-       _dd if=/dev/zero of="$testf" bs=1K count=2 oflag=direct,append &>/dev/null \
+       _dd if=/dev/zero of="$testf" bs=1k count=2 oflag=direct,append &>/dev/null \
                || ts_skip "unsupported: dd oflag=direct,append"
 
        # TODO: Should we check for sparse file support?
index dc9b73d6bc6aec88c8adb55a6c4bf314181c649a..df096bf3049c420ab1f4377d6e3ded7bf0b60fa1 100755 (executable)
@@ -36,7 +36,7 @@ IMG=$(ts_image_init 5)
 mkfs.ext2 -F "$IMG" &> /dev/null || ts_die "Cannot make extn on $IMG"
 OFFSET=$(stat -c %s "$IMG")
 
-dd if="$IMG" of="$IMG" oflag=append bs=5MiB count=1 conv=notrunc &>/dev/null
+dd if="$IMG" of="$IMG" oflag=append bs=1024k count=5 conv=notrunc &>/dev/null
 
 [ -d "$TS_MOUNTPOINT-1" ] || mkdir -p $TS_MOUNTPOINT-1
 [ -d "$TS_MOUNTPOINT-2" ] || mkdir -p $TS_MOUNTPOINT-2