aboutsummaryrefslogtreecommitdiffstats
path: root/cmds-device.c
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.cz>2014-04-24 18:57:12 +0200
committerDavid Sterba <dsterba@suse.cz>2014-12-04 16:48:11 +0100
commitda28664bf77fbd24ded2987d9792e1209c522433 (patch)
tree3286d8bf9f2c3ff2f42bdd13272900cf4451d926 /cmds-device.c
parentc7b5293d8d7e3cd5c883a11f979c391fdb45230b (diff)
downloadbtrfs-progs-da28664bf77fbd24ded2987d9792e1209c522433.tar.gz
btrfs-progs-da28664bf77fbd24ded2987d9792e1209c522433.tar.xz
btrfs-progs-da28664bf77fbd24ded2987d9792e1209c522433.zip
btrfs-progs: compare unallocated space against the correct value
The device may not be fully occupied by the filesystem, the value of Unallocated should not be calculated against the device size but the size provided by DEV_INFO. Signed-off-by: David Sterba <dsterba@suse.cz>
Diffstat (limited to 'cmds-device.c')
-rw-r--r--cmds-device.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/cmds-device.c b/cmds-device.c
index 546db6d..197f9d5 100644
--- a/cmds-device.c
+++ b/cmds-device.c
@@ -477,10 +477,8 @@ static int _cmd_device_usage(int fd, char *path, int mode)
printf("%s, ID: %llu\n", device_info_ptr[i].path,
device_info_ptr[i].devid);
print_device_sizes(fd, &device_info_ptr[i], mode);
- print_device_chunks(fd, device_info_ptr[i].devid,
- device_info_ptr[i].size,
- info_ptr, info_count,
- mode);
+ print_device_chunks(fd, &device_info_ptr[i],
+ info_ptr, info_count, mode);
printf("\n");
}