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

Provenance
matt-fidd <81489167+matt-fidd@users.noreply.github.com>Authored on Apr 6 2021, 11:05 PM
GitHub <noreply@github.com>Committed on Apr 6 2021, 11:05 PM
Parents
rGbbcec73783c5: kmem_alloc(KM_SLEEP) should use kvmalloc()
Branches
Unknown
Tags
Unknown

Event Timeline

GitHub <noreply@github.com> committed rGa03b288cf08f: zfs get -p only outputs 3 columns if "clones" property is empty (authored by matt-fidd <81489167+matt-fidd@users.noreply.github.com>).Apr 6 2021, 11:05 PM