X-Git-Url: https://git.camperquake.de/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fzfs%2Fzfs_main.c;h=518000cf1e0fbee3a841568558edcba4643ec0bb;hb=750562833f5009e1602e3b7d8f10497ee683f611;hp=5354477128774d11f12e57d5d6668cc4d0e332da;hpb=b740d602bdeca757180a7098be28701a7cde7fbd;p=zfs.git diff --git a/cmd/zfs/zfs_main.c b/cmd/zfs/zfs_main.c index 5354477..518000c 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("-"); @@ -5469,7 +5469,7 @@ share_mount(int op, int argc, char **argv) int flags = 0; /* check options */ - while ((c = getopt(argc, argv, op == OP_MOUNT ? ":avo:" : "a")) + while ((c = getopt(argc, argv, op == OP_MOUNT ? ":avo:O" : "a")) != -1) { switch (c) { case 'a': @@ -5491,7 +5491,9 @@ share_mount(int op, int argc, char **argv) /* option validation is done later */ append_options(options, optarg); break; - + case 'O': + flags |= MS_OVERLAY; + break; case ':': (void) fprintf(stderr, gettext("missing argument for " "'%c' option\n"), optopt);