Files
mirror_zfs/lib/libzfs
Umer Saleem 1c6b0302ef Fix user properties output for zpool list
In zpool_get_user_prop, when called from zpool_expand_proplist and
collect_pool, we often have zpool_props present in zpool_handle_t equal
to NULL. This mostly happens when only one user property is requested
using zpool list -o <user_property>. Checking for this case and
correctly initializing the zpool_props field in zpool_handle_t fixes
this issue.

Interestingly, this issue does not occur if we query any other property
like name or guid along with a user property with -o flag because while
accessing properties like guid, zpool_prop_get_int is called which
checks for this case specifically and calls zpool_get_all_props.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Signed-off-by: Umer Saleem <usaleem@ixsystems.com>
Closes #16734
2024-11-14 16:51:12 -08:00
..
2020-07-10 14:26:00 -07:00
2024-01-12 12:35:29 -08:00
2024-10-02 20:47:11 -07:00
2024-10-09 13:44:32 -07:00
2020-11-17 09:18:52 -08:00
2024-10-09 13:44:32 -07:00
2019-09-02 17:53:27 -07:00