mirror_zfs/cmd
Umer Saleem d9ac17a57f Expose libzutil error info in libpc_handle_t
In libzutil, for zpool_search_import and zpool_find_config, we use
libpc_handle_t internally, which does not maintain error code and it is
not exposed in the interface. Due to this, the error information is not
propagated to the caller. Instead, an error message is printed on
stderr.

This commit adds lpc_error field in libpc_handle_t and exposes it in
the interface, which can be used by the users of libzutil to get the
appropriate error information and handle it accordingly.

Users of the API can also control if they want to print the error
message on stderr.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Umer Saleem <usaleem@ixsystems.com>
Closes #13969
2022-10-04 09:54:35 -07:00
..
raidz_test Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
zdb Expose libzutil error info in libpc_handle_t 2022-10-04 09:54:35 -07:00
zed Reduce false positives from Static Analyzers 2022-09-30 15:30:12 -07:00
zfs Fix unsafe string operations 2022-09-27 16:47:24 -07:00
zinject Fix unsafe string operations 2022-09-27 16:47:24 -07:00
zpool Expose libzutil error info in libpc_handle_t 2022-10-04 09:54:35 -07:00
zpool_influxdb Fix unchecked return values 2022-09-29 09:02:57 -07:00
zstream Fix userland dereference NULL return value bugs 2022-09-30 17:02:57 -07:00
arc_summary cmd: move single-file binaries up, extract udev programs to udev/ 2022-05-10 10:20:34 -07:00
arcstat.in arcstat: fix -p option 2022-08-12 14:21:52 -07:00
dbufstat.in Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
fsck.zfs.in cmd: move single-file binaries up, extract udev programs to udev/ 2022-05-10 10:20:34 -07:00
Makefile.am Add zilstat script to report zil kstats in a user friendly manner 2022-09-02 13:24:07 -07:00
mount_zfs.c Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
zfs_ids_to_path.c Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
zgenhostid.c Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
zhack.c Expose libzutil error info in libpc_handle_t 2022-10-04 09:54:35 -07:00
zilstat.in Add zilstat script to report zil kstats in a user friendly manner 2022-09-02 13:24:07 -07:00
ztest.c Expose libzutil error info in libpc_handle_t 2022-10-04 09:54:35 -07:00
zvol_wait cmd: move single-file binaries up, extract udev programs to udev/ 2022-05-10 10:20:34 -07:00