diff options
author | Ryan Moeller <[email protected]> | 2020-07-09 20:47:12 -0400 |
---|---|---|
committer | GitHub <[email protected]> | 2020-07-09 17:47:12 -0700 |
commit | 659f4008be86d5eaf67184c83fddbcb6800a3705 (patch) | |
tree | fdf08b835f036236ac714fcd32ab3af966c062ee /lib/libzfs/libzfs_sendrecv.c | |
parent | fb91f0367e91fb74a391f56d80fa3d3a9c6a2902 (diff) |
libzfs: Make zfs_cmd_t initialization consistent, use zfs_ioctl
The clang version 8.0.1 shipped in FreeBSD 12.1-RELEASE also oddly
throws a warning that is treated as an error on the initialization of
the zc struct in zpool_nextboot.
The zpool_nextboot code from FreeBSD was not updated to use zfs_ioctl.
Switch ioctl to zfs_ioctl in and use {"\0"} to initialize the struct.
Do a consistency pass for zfs_cmd_t initialization.
Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: George Wilson <[email protected]>
Signed-off-by: Ryan Moeller <[email protected]>
Closes #10539
Diffstat (limited to 'lib/libzfs/libzfs_sendrecv.c')
-rw-r--r-- | lib/libzfs/libzfs_sendrecv.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libzfs/libzfs_sendrecv.c b/lib/libzfs/libzfs_sendrecv.c index 75f4e056b..f1524c384 100644 --- a/lib/libzfs/libzfs_sendrecv.c +++ b/lib/libzfs/libzfs_sendrecv.c @@ -860,7 +860,8 @@ int zfs_send_progress(zfs_handle_t *zhp, int fd, uint64_t *bytes_written, uint64_t *blocks_visited) { - zfs_cmd_t zc = { {0} }; + zfs_cmd_t zc = {"\0"}; + (void) strlcpy(zc.zc_name, zhp->zfs_name, sizeof (zc.zc_name)); zc.zc_cookie = fd; if (zfs_ioctl(zhp->zfs_hdl, ZFS_IOC_SEND_PROGRESS, &zc) != 0) |