Fix string/index variables being unflexed by default

I got the status backward (B_FALSE for fixed, rather than B_TRUE for
flex); before:

  $ zfs get mountpoint tarta-zoot -r
  NAME                                 PROPERTY    VALUE       SOURCE
  tarta-zoot                           mountpoint  /           local
  tarta-zoot/PAGEFILE.SYS              mountpoint  -           -
  tarta-zoot/etc                       mountpoint  /etc        inherited from tarta-zoot
  tarta-zoot/home                      mountpoint  /home       inherited from tarta-zoot
  tarta-zoot/home/xspon                mountpoint  /home/xspon  inherited from tarta-zoot
  tarta-zoot/home/nabijaczleweli       mountpoint  /home/nabijaczleweli  inherited from tarta-zoot
  tarta-zoot/home/nabijaczleweli/tftp  mountpoint  /home/nabijaczleweli/tftp  inherited from tarta-zoot
  tarta-zoot/home/root                 mountpoint  /root       local

after:

  $ zfs get mountpoint tarta-zoot -r
  NAME                                 PROPERTY    VALUE                      SOURCE
  tarta-zoot                           mountpoint  /                          local
  tarta-zoot/PAGEFILE.SYS              mountpoint  -                          -
  tarta-zoot/etc                       mountpoint  /etc                       inherited from tarta-zoot
  tarta-zoot/home                      mountpoint  /home                      inherited from tarta-zoot
  tarta-zoot/home/xspon                mountpoint  /home/xspon                inherited from tarta-zoot
  tarta-zoot/home/nabijaczleweli       mountpoint  /home/nabijaczleweli       inherited from tarta-zoot
  tarta-zoot/home/nabijaczleweli/tftp  mountpoint  /home/nabijaczleweli/tftp  inherited from tarta-zoot
  tarta-zoot/home/root                 mountpoint  /root                      local

Fixes: be8e1d81bf ("Flex
 non-pretty-printed properties and raw-/pretty-print remaining ones")
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13286
This commit is contained in:
наб 2022-04-05 18:34:46 +02:00 committed by GitHub
parent 7d524c068d
commit 9292cf761e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -136,7 +136,7 @@ zprop_register_string(int prop, const char *name, const char *def,
const char *colname, const struct zfs_mod_supported_features *sfeatures) const char *colname, const struct zfs_mod_supported_features *sfeatures)
{ {
zprop_register_impl(prop, name, PROP_TYPE_STRING, 0, def, attr, zprop_register_impl(prop, name, PROP_TYPE_STRING, 0, def, attr,
objset_types, values, colname, B_FALSE, B_TRUE, B_FALSE, NULL, objset_types, values, colname, B_FALSE, B_TRUE, B_TRUE, NULL,
sfeatures); sfeatures);
} }
@ -159,7 +159,7 @@ zprop_register_index(int prop, const char *name, uint64_t def,
const struct zfs_mod_supported_features *sfeatures) const struct zfs_mod_supported_features *sfeatures)
{ {
zprop_register_impl(prop, name, PROP_TYPE_INDEX, def, NULL, attr, zprop_register_impl(prop, name, PROP_TYPE_INDEX, def, NULL, attr,
objset_types, values, colname, B_FALSE, B_TRUE, B_FALSE, idx_tbl, objset_types, values, colname, B_FALSE, B_TRUE, B_TRUE, idx_tbl,
sfeatures); sfeatures);
} }