X-Git-Url: https://git.camperquake.de/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fzfs%2Fzfs_main.c;h=a052be520f5010a466452a2c9a94c0d60fb31684;hb=b9c59ec83ab50e1cd097f067461e34a5750694c8;hp=54d057b1e915fbfe3fae9fd233fc8d608f0f0dcb;hpb=0b7936d5c2337bc976ac831c1c38de563844c36b;p=zfs.git diff --git a/cmd/zfs/zfs_main.c b/cmd/zfs/zfs_main.c index 54d057b..a052be5 100644 --- a/cmd/zfs/zfs_main.c +++ b/cmd/zfs/zfs_main.c @@ -2374,7 +2374,7 @@ zfs_do_userspace(int argc, char **argv) boolean_t prtnum = B_FALSE; boolean_t parseable = B_FALSE; boolean_t sid2posix = B_FALSE; - int error; + int error = 0; int c; zfs_sort_column_t *default_sortcol = NULL; zfs_sort_column_t *sortcol = NULL; @@ -4457,7 +4457,7 @@ construct_fsacl_list(boolean_t un, struct allow_opts *opts, nvlist_t **nvlp) while (curr < end) { const char *who; - zfs_deleg_who_type_t who_type; + zfs_deleg_who_type_t who_type = ZFS_DELEG_WHO_UNKNOWN; char *endch; char *delim = strchr(curr, ','); char errbuf[256]; @@ -4562,7 +4562,7 @@ print_set_creat_perms(uu_avl_t *who_avl) deleg_perm_node_t *deleg_node; if (prev_weight != weight) { - (void) printf(*title_ptr++); + (void) printf("%s", *title_ptr++); prev_weight = weight; } @@ -4617,7 +4617,7 @@ print_uge_deleg_perms(uu_avl_t *who_avl, boolean_t local, boolean_t descend, const char *who = NULL; if (prt_title) { prt_title = B_FALSE; - (void) printf(title); + (void) printf("%s", title); } switch (who_type) { @@ -4676,7 +4676,7 @@ print_fs_perms(fs_perm_set_t *fspset) (void) snprintf(buf, ZFS_MAXNAMELEN+32, gettext("---- Permissions on %s "), node->fspn_fsperm.fsp_name); - (void) printf(dsname); + (void) printf("%s", dsname); left = 70 - strlen(buf); while (left-- > 0) (void) printf("-"); @@ -6177,7 +6177,7 @@ main(int argc, char **argv) /* * Run the appropriate command. */ - libzfs_mnttab_cache(g_zfs, B_TRUE); + libzfs_mnttab_cache(g_zfs, B_FALSE); if (find_command_idx(cmdname, &i) == 0) { current_command = &command_table[i]; ret = command_table[i].func(argc - 1, argv + 1); @@ -6191,7 +6191,6 @@ main(int argc, char **argv) usage(B_FALSE); ret = 1; } - libzfs_mnttab_cache(g_zfs, B_FALSE); libzfs_fini(g_zfs); (void) fclose(mnttab_file);