diff options
author | Warner Losh <imp@FreeBSD.org> | 2024-02-22 15:17:56 +0000 |
---|---|---|
committer | Warner Losh <imp@FreeBSD.org> | 2024-02-22 16:31:56 +0000 |
commit | e54bb0ad8058c0f84ceb08b49bb1d22af829a9e8 (patch) | |
tree | 10d26aac98be8ba4e520300e0d209593bc046d9d | |
parent | b3e76e3d9e2262c4b79e81e63e09bfe62c1f6baa (diff) | |
download | src-e54bb0ad8058c0f84ceb08b49bb1d22af829a9e8.tar.gz src-e54bb0ad8058c0f84ceb08b49bb1d22af829a9e8.zip |
loader: return errors from writing ZFS labels
vdev_write_bootenv_impl can only return success. Instead, return the
last error. This will make any write errors more visible. The old code
masked kboot's inability to write bootenv.
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D44018
-rw-r--r-- | stand/libsa/zfs/zfsimpl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/stand/libsa/zfs/zfsimpl.c b/stand/libsa/zfs/zfsimpl.c index ed9c3753dd19..fc9bedac7621 100644 --- a/stand/libsa/zfs/zfsimpl.c +++ b/stand/libsa/zfs/zfsimpl.c @@ -1688,7 +1688,7 @@ vdev_write_bootenv_impl(vdev_t *vdev, vdev_boot_envblock_t *be) if (kid->v_state != VDEV_STATE_HEALTHY) continue; rc = vdev_write_bootenv_impl(kid, be); - if (rv == 0) + if (rv != 0) rv = rc; } |