HomeFreeBSD

zfs get -p only outputs 3 columns if "clones" property is empty

Description

zfs get -p only outputs 3 columns if "clones" property is empty

get_clones_string currently returns an empty string for filesystem
snapshots which have no clones. This breaks parsable zfs get output as
only three columns are output, instead of 4.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Matt Fiddaman <github@m.fiddaman.uk>
Co-authored-by: matt <matt@fiddaman.net>
Closes #11837

Details

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rG1bb4b5a5aee3: zfs get -p only outputs 3 columns if "clones" property is empty (authored by matt-fidd <81489167+matt-fidd@users.noreply.github.com>).Apr 7 2021, 8:28 PM