mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2025-01-12 19:20:28 +03:00
ztest: display non-index properties properly at verbose level 6
At verbosity levels of 6 or greater, ztest_dsl_prop_set_uint64() attempts to display the value of all properties as indexed values regardless of whether the property is an indexed value or simply an un-indexed integer. This patch causes the numeric value of the property to be displayed if zfs_prop_index_to_string() fails. Signed-off-by: Tim Chase <tim@chase2k.com> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #3649
This commit is contained in:
parent
69520d6855
commit
6bec4351f5
@ -1097,9 +1097,16 @@ ztest_dsl_prop_set_uint64(char *osname, zfs_prop_t prop, uint64_t value,
|
||||
VERIFY0(dsl_prop_get_integer(osname, propname, &curval, setpoint));
|
||||
|
||||
if (ztest_opts.zo_verbose >= 6) {
|
||||
VERIFY(zfs_prop_index_to_string(prop, curval, &valname) == 0);
|
||||
(void) printf("%s %s = %s at '%s'\n",
|
||||
osname, propname, valname, setpoint);
|
||||
int err;
|
||||
|
||||
err = zfs_prop_index_to_string(prop, curval, &valname);
|
||||
if (err)
|
||||
(void) printf("%s %s = %llu at '%s'\n",
|
||||
osname, propname, (unsigned long long)curval,
|
||||
setpoint);
|
||||
else
|
||||
(void) printf("%s %s = %s at '%s'\n",
|
||||
osname, propname, valname, setpoint);
|
||||
}
|
||||
umem_free(setpoint, MAXPATHLEN);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user