From: Daniel Golle Date: Tue, 6 Jul 2021 04:20:12 +0000 (+0100) Subject: uvol: fix units with lvm backend X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=194e7f0286b880b34f62a5d6b556753fa1aa470e;p=feed%2Fpackages.git uvol: fix units with lvm backend Free and total bytes are now properly returned as bytes by LVM2 as requested. No longer multiply values. Fix parameter order of 'create' command in usage output while at it. Signed-off-by: Daniel Golle --- diff --git a/utils/uvol/files/lvm.sh b/utils/uvol/files/lvm.sh index 4b295faf17..06a4920b8c 100644 --- a/utils/uvol/files/lvm.sh +++ b/utils/uvol/files/lvm.sh @@ -46,11 +46,11 @@ lvs() { } freebytes() { - echo $((vg_free_count * vg_extent_size * 1024)) + echo $((vg_free_count * vg_extent_size)) } totalbytes() { - echo $((vg_extent_count * vg_extent_size * 1024)) + echo $((vg_extent_count * vg_extent_size)) } existvol() { diff --git a/utils/uvol/files/uvol b/utils/uvol/files/uvol index 04547ce622..4ecd2e165a 100644 --- a/utils/uvol/files/uvol +++ b/utils/uvol/files/uvol @@ -17,9 +17,9 @@ commands: total show total number of bytes align show sector size in bytes list [volname] list volumes - create volname type size create new volume - type: 'ro' or 'rw' + create volname size type create new volume size: in bytes + type: 'ro' or 'rw' remove volname delete volume device volname show block device for mounting size volname show size of volume