Merge commit 'refs/top-bases/linux-have-fm' into linux-have-fm

This commit is contained in:
Brian Behlendorf 2009-03-11 21:00:05 -07:00
commit c37cad07c9
9 changed files with 67 additions and 62 deletions

View File

@ -817,7 +817,7 @@ dump_dsl_dataset(objset_t *os, uint64_t object, void *data, size_t size)
static void
dump_bplist(objset_t *mos, uint64_t object, char *name)
{
bplist_t bpl = { 0 };
bplist_t bpl;
blkptr_t blk, *bp = &blk;
uint64_t itor = 0;
char bytes[6];
@ -827,6 +827,7 @@ dump_bplist(objset_t *mos, uint64_t object, char *name)
if (dump_opt['d'] < 3)
return;
bzero(&bpl, sizeof(bplist_t));
mutex_init(&bpl.bpl_lock, NULL, MUTEX_DEFAULT, NULL);
VERIFY(0 == bplist_open(&bpl, mos, object));
if (bplist_empty(&bpl)) {
@ -1567,13 +1568,15 @@ zdb_blkptr_cb(spa_t *spa, blkptr_t *bp, const zbookmark_t *zb,
static int
dump_block_stats(spa_t *spa)
{
zdb_cb_t zcb = { 0 };
zdb_cb_t zcb;
zdb_blkstats_t *zb, *tzb;
uint64_t alloc, space, logalloc;
vdev_t *rvd = spa->spa_root_vdev;
int leaks = 0;
int c, e;
bzero(&zcb, sizeof(zdb_cb_t));
if (!dump_opt['S']) {
(void) printf("\nTraversing all blocks %s%s%s%s...\n",
(dump_opt['c'] || !dump_opt['L']) ? "to verify " : "",

View File

@ -1932,11 +1932,12 @@ ztest_dmu_write_parallel(ztest_args_t *za)
pthread_mutex_t *lp;
char osname[MAXNAMELEN];
char iobuf[SPA_MAXBLOCKSIZE];
blkptr_t blk = { 0 };
blkptr_t blk;
uint64_t blkoff;
zbookmark_t zb;
dmu_tx_t *tx = dmu_tx_create(os);
bzero(&blk, sizeof(blkptr_t));
dmu_objset_name(os, osname);
/*

View File

@ -103,7 +103,7 @@ namespace_reload(libzfs_handle_t *hdl)
nvlist_t *config;
config_node_t *cn;
nvpair_t *elem;
zfs_cmd_t zc = { 0 };
zfs_cmd_t zc = { "\0", "\0", "\0", 0 };
void *cookie;
if (hdl->libzfs_ns_gen == 0) {
@ -228,7 +228,7 @@ zpool_get_config(zpool_handle_t *zhp, nvlist_t **oldconfig)
int
zpool_refresh_stats(zpool_handle_t *zhp, boolean_t *missing)
{
zfs_cmd_t zc = { 0 };
zfs_cmd_t zc = { "\0", "\0", "\0", 0 };
int error;
nvlist_t *config;
libzfs_handle_t *hdl = zhp->zpool_hdl;

View File

@ -368,7 +368,7 @@ static int
get_stats(zfs_handle_t *zhp)
{
int rc = 0;
zfs_cmd_t zc = { 0 };
zfs_cmd_t zc = { "\0", "\0", "\0", 0 };
if (zcmd_alloc_dst_nvlist(zhp->zfs_hdl, &zc, 0) != 0)
return (-1);
@ -415,7 +415,7 @@ top:
if (zhp->zfs_dmustats.dds_inconsistent) {
zfs_cmd_t zc2 = { 0 };
zfs_cmd_t zc2 = { "\0", "\0", "\0", 0 };
/*
* If it is dds_inconsistent, then we've caught it in
@ -489,7 +489,7 @@ top:
zfs_handle_t *
make_dataset_handle(libzfs_handle_t *hdl, const char *path)
{
zfs_cmd_t zc = { 0 };
zfs_cmd_t zc = { "\0", "\0", "\0", 0 };
zfs_handle_t *zhp = calloc(sizeof (zfs_handle_t), 1);
@ -1391,7 +1391,7 @@ zfs_build_perms(zfs_handle_t *zhp, char *whostr, char *perms,
static int
zfs_perm_set_common(zfs_handle_t *zhp, nvlist_t *nvp, boolean_t unset)
{
zfs_cmd_t zc = { 0 };
zfs_cmd_t zc = { "\0", "\0", "\0", 0 };
int error;
char errbuf[1024];
@ -1605,7 +1605,7 @@ zfs_coalesce_perm(zfs_handle_t *zhp, zfs_allow_node_t *allownode,
int
zfs_perm_get(zfs_handle_t *zhp, zfs_allow_t **zfs_perms)
{
zfs_cmd_t zc = { 0 };
zfs_cmd_t zc = { "\0", "\0", "\0", 0 };
int error;
nvlist_t *nvlist;
nvlist_t *permnv, *sourcenv;
@ -1943,7 +1943,7 @@ zfs_deleg_permissions(void)
int
zfs_prop_set(zfs_handle_t *zhp, const char *propname, const char *propval)
{
zfs_cmd_t zc = { 0 };
zfs_cmd_t zc = { "\0", "\0", "\0", 0 };
int ret = -1;
prop_changelist_t *cl = NULL;
char errbuf[1024];
@ -2103,7 +2103,7 @@ error:
int
zfs_prop_inherit(zfs_handle_t *zhp, const char *propname)
{
zfs_cmd_t zc = { 0 };
zfs_cmd_t zc = { "\0", "\0", "\0", 0 };
int ret;
prop_changelist_t *cl;
libzfs_handle_t *hdl = zhp->zfs_hdl;
@ -2253,7 +2253,7 @@ static int
get_numeric_property(zfs_handle_t *zhp, zfs_prop_t prop, zprop_source_t *src,
char **source, uint64_t *val)
{
zfs_cmd_t zc = { 0 };
zfs_cmd_t zc = { "\0", "\0", "\0", 0 };
nvlist_t *zplprops = NULL;
struct mnttab mnt;
char *mntopt_on = NULL;
@ -2801,7 +2801,7 @@ top:
int
zfs_iter_filesystems(zfs_handle_t *zhp, zfs_iter_f func, void *data)
{
zfs_cmd_t zc = { 0 };
zfs_cmd_t zc = { "\0", "\0", "\0", 0 };
zfs_handle_t *nzhp;
int ret;
@ -2843,7 +2843,7 @@ zfs_iter_filesystems(zfs_handle_t *zhp, zfs_iter_f func, void *data)
int
zfs_iter_snapshots(zfs_handle_t *zhp, zfs_iter_f func, void *data)
{
zfs_cmd_t zc = { 0 };
zfs_cmd_t zc = { "\0", "\0", "\0", 0 };
zfs_handle_t *nzhp;
int ret;
@ -2913,7 +2913,7 @@ static int
check_parents(libzfs_handle_t *hdl, const char *path, uint64_t *zoned,
boolean_t accept_ancestor, int *prefixlen)
{
zfs_cmd_t zc = { 0 };
zfs_cmd_t zc = { "\0", "\0", "\0", 0 };
char parent[ZFS_MAXNAMELEN];
char *slash;
zfs_handle_t *zhp;
@ -3118,7 +3118,7 @@ int
zfs_create(libzfs_handle_t *hdl, const char *path, zfs_type_t type,
nvlist_t *props)
{
zfs_cmd_t zc = { 0 };
zfs_cmd_t zc = { "\0", "\0", "\0", 0 };
int ret;
uint64_t size = 0;
uint64_t blocksize = zfs_prop_default_numeric(ZFS_PROP_VOLBLOCKSIZE);
@ -3281,7 +3281,7 @@ zfs_create(libzfs_handle_t *hdl, const char *path, zfs_type_t type,
int
zfs_destroy(zfs_handle_t *zhp)
{
zfs_cmd_t zc = { 0 };
zfs_cmd_t zc = { "\0", "\0", "\0", 0 };
(void) strlcpy(zc.zc_name, zhp->zfs_name, sizeof (zc.zc_name));
@ -3361,7 +3361,7 @@ zfs_remove_link_cb(zfs_handle_t *zhp, void *arg)
int
zfs_destroy_snaps(zfs_handle_t *zhp, char *snapname)
{
zfs_cmd_t zc = { 0 };
zfs_cmd_t zc = { "\0", "\0", "\0", 0 };
int ret;
struct destroydata dd = { 0 };
@ -3405,7 +3405,7 @@ zfs_destroy_snaps(zfs_handle_t *zhp, char *snapname)
int
zfs_clone(zfs_handle_t *zhp, const char *target, nvlist_t *props)
{
zfs_cmd_t zc = { 0 };
zfs_cmd_t zc = { "\0", "\0", "\0", 0 };
char parent[ZFS_MAXNAMELEN];
int ret;
char errbuf[1024];
@ -3554,7 +3554,7 @@ int
zfs_promote(zfs_handle_t *zhp)
{
libzfs_handle_t *hdl = zhp->zfs_hdl;
zfs_cmd_t zc = { 0 };
zfs_cmd_t zc = { "\0", "\0", "\0", 0 };
char parent[MAXPATHLEN];
char *cp;
int ret;
@ -3677,7 +3677,7 @@ zfs_snapshot(libzfs_handle_t *hdl, const char *path, boolean_t recursive,
const char *delim;
char parent[ZFS_MAXNAMELEN];
zfs_handle_t *zhp;
zfs_cmd_t zc = { 0 };
zfs_cmd_t zc = { "\0", "\0", "\0", 0 };
int ret;
char errbuf[1024];
@ -3829,7 +3829,7 @@ zfs_rollback(zfs_handle_t *zhp, zfs_handle_t *snap, boolean_t force)
{
rollback_data_t cb = { 0 };
int err;
zfs_cmd_t zc = { 0 };
zfs_cmd_t zc = { "\0", "\0", "\0", 0 };
boolean_t restore_resv = 0;
uint64_t old_volsize = 0, new_volsize;
zfs_prop_t resv_prop;
@ -3951,7 +3951,7 @@ int
zfs_rename(zfs_handle_t *zhp, const char *target, boolean_t recursive)
{
int ret;
zfs_cmd_t zc = { 0 };
zfs_cmd_t zc = { "\0", "\0", "\0", 0 };
char *delim;
prop_changelist_t *cl = NULL;
zfs_handle_t *zhrp = NULL;
@ -4269,7 +4269,7 @@ zvol_create_link_common(libzfs_handle_t *hdl, const char *dataset, int ifexists)
int
zvol_remove_link(libzfs_handle_t *hdl, const char *dataset)
{
zfs_cmd_t zc = { 0 };
zfs_cmd_t zc = { "\0", "\0", "\0", 0 };
(void) strlcpy(zc.zc_name, dataset, sizeof (zc.zc_name));
@ -4444,7 +4444,7 @@ int
zfs_deleg_share_nfs(libzfs_handle_t *hdl, char *dataset, char *path,
void *export, void *sharetab, int sharemax, zfs_share_op_t operation)
{
zfs_cmd_t zc = { 0 };
zfs_cmd_t zc = { "\0", "\0", "\0", 0 };
int error;
(void) strlcpy(zc.zc_name, dataset, sizeof (zc.zc_name));

View File

@ -381,7 +381,7 @@ zfs_graph_add(libzfs_handle_t *hdl, zfs_graph_t *zgp, const char *source,
static int
iterate_children(libzfs_handle_t *hdl, zfs_graph_t *zgp, const char *dataset)
{
zfs_cmd_t zc = { 0 };
zfs_cmd_t zc = { "\0", "\0", "\0", 0 };
zfs_vertex_t *zvp;
/*
@ -482,7 +482,7 @@ iterate_children(libzfs_handle_t *hdl, zfs_graph_t *zgp, const char *dataset)
static boolean_t
external_dependents(libzfs_handle_t *hdl, zfs_graph_t *zgp, const char *dataset)
{
zfs_cmd_t zc = { 0 };
zfs_cmd_t zc = { "\0", "\0", "\0", 0 };
/*
* Check whether this dataset is a clone or has clones since

View File

@ -367,7 +367,7 @@ static nvlist_t *
refresh_config(libzfs_handle_t *hdl, nvlist_t *config)
{
nvlist_t *nvl;
zfs_cmd_t zc = { 0 };
zfs_cmd_t zc = { "\0", "\0", "\0", 0 };
int err;
if (zcmd_write_conf_nvlist(hdl, &zc, config) != 0)

View File

@ -64,7 +64,7 @@ static int read_efi_label(nvlist_t *config, diskaddr_t *sb);
static int
zpool_get_all_props(zpool_handle_t *zhp)
{
zfs_cmd_t zc = { 0 };
zfs_cmd_t zc = { "\0", "\0", "\0", 0 };
libzfs_handle_t *hdl = zhp->zpool_hdl;
(void) strlcpy(zc.zc_name, zhp->zpool_name, sizeof (zc.zc_name));
@ -548,7 +548,7 @@ error:
int
zpool_set_prop(zpool_handle_t *zhp, const char *propname, const char *propval)
{
zfs_cmd_t zc = { 0 };
zfs_cmd_t zc = { "\0", "\0", "\0", 0 };
int ret = -1;
char errbuf[1024];
nvlist_t *nvl = NULL;
@ -853,7 +853,7 @@ int
zpool_create(libzfs_handle_t *hdl, const char *pool, nvlist_t *nvroot,
nvlist_t *props, nvlist_t *fsprops)
{
zfs_cmd_t zc = { 0 };
zfs_cmd_t zc = { "\0", "\0", "\0", 0 };
nvlist_t *zc_fsprops = NULL;
nvlist_t *zc_props = NULL;
char msg[1024];
@ -983,7 +983,7 @@ create_failed:
int
zpool_destroy(zpool_handle_t *zhp)
{
zfs_cmd_t zc = { 0 };
zfs_cmd_t zc = { "\0", "\0", "\0", 0 };
zfs_handle_t *zfp = NULL;
libzfs_handle_t *hdl = zhp->zpool_hdl;
char msg[1024];
@ -1030,7 +1030,7 @@ zpool_destroy(zpool_handle_t *zhp)
int
zpool_add(zpool_handle_t *zhp, nvlist_t *nvroot)
{
zfs_cmd_t zc = { 0 };
zfs_cmd_t zc = { "\0", "\0", "\0", 0 };
int ret;
libzfs_handle_t *hdl = zhp->zpool_hdl;
char msg[1024];
@ -1153,7 +1153,7 @@ zpool_add(zpool_handle_t *zhp, nvlist_t *nvroot)
int
zpool_export_common(zpool_handle_t *zhp, boolean_t force, boolean_t hardforce)
{
zfs_cmd_t zc = { 0 };
zfs_cmd_t zc = { "\0", "\0", "\0", 0 };
char msg[1024];
if (zpool_remove_zvol_links(zhp) != 0)
@ -1245,7 +1245,7 @@ int
zpool_import_props(libzfs_handle_t *hdl, nvlist_t *config, const char *newname,
nvlist_t *props, boolean_t importfaulted)
{
zfs_cmd_t zc = { 0 };
zfs_cmd_t zc = { "\0", "\0", "\0", 0 };
char *thename;
char *origname;
int ret;
@ -1349,7 +1349,7 @@ zpool_import_props(libzfs_handle_t *hdl, nvlist_t *config, const char *newname,
int
zpool_scrub(zpool_handle_t *zhp, pool_scrub_type_t type)
{
zfs_cmd_t zc = { 0 };
zfs_cmd_t zc = { "\0", "\0", "\0", 0 };
char msg[1024];
libzfs_handle_t *hdl = zhp->zpool_hdl;
@ -1614,7 +1614,7 @@ int
zpool_vdev_online(zpool_handle_t *zhp, const char *path, int flags,
vdev_state_t *newstate)
{
zfs_cmd_t zc = { 0 };
zfs_cmd_t zc = { "\0", "\0", "\0", 0 };
char msg[1024];
nvlist_t *tgt;
boolean_t avail_spare, l2cache;
@ -1650,7 +1650,7 @@ zpool_vdev_online(zpool_handle_t *zhp, const char *path, int flags,
int
zpool_vdev_offline(zpool_handle_t *zhp, const char *path, boolean_t istmp)
{
zfs_cmd_t zc = { 0 };
zfs_cmd_t zc = { "\0", "\0", "\0", 0 };
char msg[1024];
nvlist_t *tgt;
boolean_t avail_spare, l2cache;
@ -1695,7 +1695,7 @@ zpool_vdev_offline(zpool_handle_t *zhp, const char *path, boolean_t istmp)
int
zpool_vdev_fault(zpool_handle_t *zhp, uint64_t guid)
{
zfs_cmd_t zc = { 0 };
zfs_cmd_t zc = { "\0", "\0", "\0", 0 };
char msg[1024];
libzfs_handle_t *hdl = zhp->zpool_hdl;
@ -1729,7 +1729,7 @@ zpool_vdev_fault(zpool_handle_t *zhp, uint64_t guid)
int
zpool_vdev_degrade(zpool_handle_t *zhp, uint64_t guid)
{
zfs_cmd_t zc = { 0 };
zfs_cmd_t zc = { "\0", "\0", "\0", 0 };
char msg[1024];
libzfs_handle_t *hdl = zhp->zpool_hdl;
@ -1782,7 +1782,7 @@ int
zpool_vdev_attach(zpool_handle_t *zhp,
const char *old_disk, const char *new_disk, nvlist_t *nvroot, int replacing)
{
zfs_cmd_t zc = { 0 };
zfs_cmd_t zc = { "\0", "\0", "\0", 0 };
char msg[1024];
int ret;
nvlist_t *tgt;
@ -1965,7 +1965,7 @@ zpool_vdev_attach(zpool_handle_t *zhp,
int
zpool_vdev_detach(zpool_handle_t *zhp, const char *path)
{
zfs_cmd_t zc = { 0 };
zfs_cmd_t zc = { "\0", "\0", "\0", 0 };
char msg[1024];
nvlist_t *tgt;
boolean_t avail_spare, l2cache;
@ -2022,7 +2022,7 @@ zpool_vdev_detach(zpool_handle_t *zhp, const char *path)
int
zpool_vdev_remove(zpool_handle_t *zhp, const char *path)
{
zfs_cmd_t zc = { 0 };
zfs_cmd_t zc = { "\0", "\0", "\0", 0 };
char msg[1024];
nvlist_t *tgt;
boolean_t avail_spare, l2cache;
@ -2057,7 +2057,7 @@ zpool_vdev_remove(zpool_handle_t *zhp, const char *path)
int
zpool_clear(zpool_handle_t *zhp, const char *path)
{
zfs_cmd_t zc = { 0 };
zfs_cmd_t zc = { "\0", "\0", "\0", 0 };
char msg[1024];
nvlist_t *tgt;
boolean_t avail_spare, l2cache;
@ -2101,7 +2101,7 @@ zpool_clear(zpool_handle_t *zhp, const char *path)
int
zpool_vdev_clear(zpool_handle_t *zhp, uint64_t guid)
{
zfs_cmd_t zc = { 0 };
zfs_cmd_t zc = { "\0", "\0", "\0", 0 };
char msg[1024];
libzfs_handle_t *hdl = zhp->zpool_hdl;
@ -2351,7 +2351,7 @@ path_to_devid(const char *path)
static void
set_path(zpool_handle_t *zhp, nvlist_t *nv, const char *path)
{
zfs_cmd_t zc = { 0 };
zfs_cmd_t zc = { "\0", "\0", "\0", 0 };
(void) strncpy(zc.zc_name, zhp->zpool_name, sizeof (zc.zc_name));
(void) strncpy(zc.zc_value, path, sizeof (zc.zc_value));
@ -2474,7 +2474,7 @@ zbookmark_compare(const void *a, const void *b)
int
zpool_get_errlog(zpool_handle_t *zhp, nvlist_t **nverrlistp)
{
zfs_cmd_t zc = { 0 };
zfs_cmd_t zc = { "\0", "\0", "\0", 0 };
uint64_t count;
zbookmark_t *zb = NULL;
int i;
@ -2570,7 +2570,7 @@ nomem:
int
zpool_upgrade(zpool_handle_t *zhp, uint64_t new_version)
{
zfs_cmd_t zc = { 0 };
zfs_cmd_t zc = { "\0", "\0", "\0", 0 };
libzfs_handle_t *hdl = zhp->zpool_hdl;
(void) strcpy(zc.zc_name, zhp->zpool_name);
@ -2632,7 +2632,7 @@ zpool_stage_history(libzfs_handle_t *hdl, const char *history_str)
static int
get_history(zpool_handle_t *zhp, char *buf, uint64_t *off, uint64_t *len)
{
zfs_cmd_t zc = { 0 };
zfs_cmd_t zc = { "\0", "\0", "\0", 0 };
libzfs_handle_t *hdl = zhp->zpool_hdl;
(void) strlcpy(zc.zc_name, zhp->zpool_name, sizeof (zc.zc_name));
@ -2759,7 +2759,7 @@ void
zpool_obj_to_path(zpool_handle_t *zhp, uint64_t dsobj, uint64_t obj,
char *pathname, size_t len)
{
zfs_cmd_t zc = { 0 };
zfs_cmd_t zc = { "\0", "\0", "\0", 0 };
boolean_t mounted = B_FALSE;
char *mntpnt = NULL;
char dsname[MAXNAMELEN];

View File

@ -451,7 +451,7 @@ static int
dump_ioctl(zfs_handle_t *zhp, const char *fromsnap, boolean_t fromorigin,
int outfd)
{
zfs_cmd_t zc = { 0 };
zfs_cmd_t zc = { "\0", "\0", "\0", 0 };
libzfs_handle_t *hdl = zhp->zfs_hdl;
assert(zhp->zfs_type == ZFS_TYPE_SNAPSHOT);
@ -552,7 +552,7 @@ dump_filesystem(zfs_handle_t *zhp, void *arg)
int rv = 0;
send_dump_data_t *sdd = arg;
boolean_t missingfrom = B_FALSE;
zfs_cmd_t zc = { 0 };
zfs_cmd_t zc = { "\0", "\0", "\0", 0 };
(void) snprintf(zc.zc_name, sizeof (zc.zc_name), "%s@%s",
zhp->zfs_name, sdd->tosnap);
@ -709,7 +709,7 @@ zfs_send(zfs_handle_t *zhp, const char *fromsnap, const char *tosnap,
dmu_replay_record_t drr = { 0 };
char *packbuf = NULL;
size_t buflen = 0;
zio_cksum_t zc = { 0 };
zio_cksum_t zc = { { 0 } };
assert(fromsnap || doall);
@ -875,7 +875,7 @@ recv_rename(libzfs_handle_t *hdl, const char *name, const char *tryname,
int baselen, char *newname, recvflags_t flags)
{
static int seq;
zfs_cmd_t zc = { 0 };
zfs_cmd_t zc = { "\0", "\0", "\0", 0 };
int err;
prop_changelist_t *clp;
zfs_handle_t *zhp;
@ -947,7 +947,7 @@ static int
recv_destroy(libzfs_handle_t *hdl, const char *name, int baselen,
char *newname, recvflags_t flags)
{
zfs_cmd_t zc = { 0 };
zfs_cmd_t zc = { "\0", "\0", "\0", 0 };
int err = 0;
prop_changelist_t *clp;
zfs_handle_t *zhp;
@ -1158,7 +1158,7 @@ again:
stream_originguid, originguid)) {
case 1: {
/* promote it! */
zfs_cmd_t zc = { 0 };
zfs_cmd_t zc = { "\0", "\0", "\0", 0 };
nvlist_t *origin_nvfs;
char *origin_fsname;
@ -1230,7 +1230,7 @@ again:
if (0 == nvlist_lookup_nvlist(stream_nvfs, "snapprops",
&props) && 0 == nvlist_lookup_nvlist(props,
stream_snapname, &props)) {
zfs_cmd_t zc = { 0 };
zfs_cmd_t zc = { "\0", "\0", "\0", 0 };
zc.zc_cookie = B_TRUE; /* clear current props */
(void) snprintf(zc.zc_name, sizeof (zc.zc_name),
@ -1556,7 +1556,7 @@ zfs_receive_one(libzfs_handle_t *hdl, int infd, const char *tosnap,
dmu_replay_record_t *drr_noswap, avl_tree_t *stream_avl,
char **top_zfs)
{
zfs_cmd_t zc = { 0 };
zfs_cmd_t zc = { "\0", "\0", "\0", 0 };
time_t begin_time;
int ioctl_err, ioctl_errno, err, choplen;
char *cp;
@ -1835,7 +1835,7 @@ zfs_receive_one(libzfs_handle_t *hdl, int infd, const char *tosnap,
zcmd_free_nvlists(&zc);
if (err == 0 && snapprops_nvlist) {
zfs_cmd_t zc2 = { 0 };
zfs_cmd_t zc2 = { "\0", "\0", "\0", 0 };
(void) strcpy(zc2.zc_name, zc.zc_value);
if (zcmd_write_src_nvlist(hdl, &zc2, snapprops_nvlist) == 0) {
@ -1990,7 +1990,7 @@ zfs_receive_impl(libzfs_handle_t *hdl, const char *tosnap, recvflags_t flags,
dmu_replay_record_t drr, drr_noswap;
struct drr_begin *drrb = &drr.drr_u.drr_begin;
char errbuf[1024];
zio_cksum_t zcksum = { 0 };
zio_cksum_t zcksum = { { 0 } };
(void) snprintf(errbuf, sizeof (errbuf), dgettext(TEXT_DOMAIN,
"cannot receive"));

View File

@ -2614,10 +2614,11 @@ dsl_dataset_promote(const char *name)
dsl_dir_t *dd;
dsl_pool_t *dp;
dmu_object_info_t doi;
struct promotearg pa = { 0 };
struct promotearg pa;
struct promotenode *snap;
int err;
bzero(&pa, sizeof(struct promotearg));
err = dsl_dataset_hold(name, FTAG, &ds);
if (err)
return (err);