mirror_zfs/lib/libzutil
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
..
os Fix userland resource leaks 2022-09-23 16:55:26 -07:00
Makefile.am autoconf: use include directives instead of recursing down lib 2022-05-10 10:18:11 -07:00
zutil_device_path.c Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
zutil_import.c Expose libzutil error info in libpc_handle_t 2022-10-04 09:54:35 -07:00
zutil_import.h Expose libzutil error info in libpc_handle_t 2022-10-04 09:54:35 -07:00
zutil_nicenum.c Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
zutil_pool.c Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00