mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-11-17 10:01:01 +03:00
Fix parsable 'zfs get' for compressratios
This is consistent with the change introduced in bc2d809
where
'zpool get -p dedupratio' does not add a trailing "x" to the output.
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: Giuseppe Di Natale <dinatale2@llnl.gov>
Signed-off-by: loli10K <ezomori.nozomu@gmail.com>
Closes #6436
Closes #6449
This commit is contained in:
parent
e3bdcb8ad8
commit
b0bd8ffecd
@ -2601,6 +2601,11 @@ zfs_prop_get(zfs_handle_t *zhp, zfs_prop_t prop, char *propbuf, size_t proplen,
|
||||
case ZFS_PROP_COMPRESSRATIO:
|
||||
if (get_numeric_property(zhp, prop, src, &source, &val) != 0)
|
||||
return (-1);
|
||||
if (literal)
|
||||
(void) snprintf(propbuf, proplen, "%llu.%02llu",
|
||||
(u_longlong_t)(val / 100),
|
||||
(u_longlong_t)(val % 100));
|
||||
else
|
||||
(void) snprintf(propbuf, proplen, "%llu.%02llux",
|
||||
(u_longlong_t)(val / 100),
|
||||
(u_longlong_t)(val % 100));
|
||||
|
Loading…
Reference in New Issue
Block a user