zfs/lib/libzfs
Low-power 4dced31b98
Fix 'zpool history' sometimes fails without reporting any error
The corresponding function 'zpool_get_history' in libzfs would printing
an error messages only when the ioctl call failed.

Add missing error reporting, specifically memory allocation failures
and error from 'zpool_history_unpack'.

Also avoid possibly reading of uninitialized 'err' variable in case
the requested offset pasts EOF.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Damian Szuberski <szuberskidamian@gmail.com>
Signed-off-by: WHR <msl0000023508@gmail.com>
Issue #13322 
Closes #13320
2022-04-15 14:16:07 -07:00
..
os libzfs: don't NULL-check infallible allocations 2022-03-30 15:30:16 -07:00
.gitignore Clean up lib dependencies 2020-07-10 14:26:00 -07:00
Makefile.am Ask libtool to stop hiding some errors 2022-03-31 10:09:18 -07:00
THIRDPARTYLICENSE.openssl Fix typos in lib/ 2019-09-02 17:53:27 -07:00
THIRDPARTYLICENSE.openssl.descrip Encryption patch follow-up 2017-10-11 16:54:48 -04:00
libzfs.abi Flex non-pretty-printed properties and raw-/pretty-print remaining ones 2022-03-04 12:08:33 -08:00
libzfs.pc.in Spruce up pkg-config files for libzfs/libzfs_core 2020-09-04 11:11:18 -07:00
libzfs.suppr Library ABI tracking with abigail 2020-11-17 09:18:52 -08:00
libzfs_changelist.c libzfs: don't NULL-check infallible allocations 2022-03-30 15:30:16 -07:00
libzfs_config.c libzfs: don't NULL-check infallible allocations 2022-03-30 15:30:16 -07:00
libzfs_crypto.c libzfs: don't NULL-check infallible allocations 2022-03-30 15:30:16 -07:00
libzfs_dataset.c libzfs: don't NULL-check infallible allocations 2022-03-30 15:30:16 -07:00
libzfs_diff.c libzfs: don't NULL-check infallible allocations 2022-03-30 15:30:16 -07:00
libzfs_impl.h libzfs: don't NULL-check infallible allocations 2022-03-30 15:30:16 -07:00
libzfs_import.c libzfs: import: zpool_clear_label: bool for boolean status 2022-04-13 11:37:18 -07:00
libzfs_iter.c libzfs: don't NULL-check infallible allocations 2022-03-30 15:30:16 -07:00
libzfs_mount.c libzfs: don't NULL-check infallible allocations 2022-03-30 15:30:16 -07:00
libzfs_pool.c Fix 'zpool history' sometimes fails without reporting any error 2022-04-15 14:16:07 -07:00
libzfs_sendrecv.c libzfs: sendrecv: use common progress thread killer 2022-04-05 09:46:07 -07:00
libzfs_status.c libzfs: Convert to fnvpair functions 2022-03-14 15:44:56 -07:00
libzfs_util.c libzfs: don't NULL-check infallible allocations 2022-03-30 15:30:16 -07:00