929 "%s.\n"), snap_name);
930 else
931 (void) fprintf(stderr, _("Unable to create %s.\n"),
932 nbe_name);
933 (void) fprintf(stderr, _("You have insufficient privileges to "
934 "execute this command.\n"));
935 break;
936 default:
937 if (is_snap)
938 (void) fprintf(stderr, _("Unable to create snapshot "
939 "%s.\n"), snap_name);
940 else
941 (void) fprintf(stderr, _("Unable to create %s.\n"),
942 nbe_name);
943 (void) fprintf(stderr, "%s\n", be_err_to_str(err));
944 }
945
946 out:
947 nvlist_free(be_attrs);
948 out2:
949 if (zfs_props != NULL)
950 nvlist_free(zfs_props);
951
952 return (err);
953 }
954
955 static int
956 be_do_destroy(int argc, char **argv)
957 {
958 nvlist_t *be_attrs;
959 boolean_t is_snap = B_FALSE;
960 boolean_t suppress_prompt = B_FALSE;
961 int err = 1;
962 int c;
963 int destroy_flags = 0;
964 char *snap_name;
965 char *be_name;
966
967 while ((c = getopt(argc, argv, "fFsv")) != -1) {
968 switch (c) {
969 case 'f':
|
929 "%s.\n"), snap_name);
930 else
931 (void) fprintf(stderr, _("Unable to create %s.\n"),
932 nbe_name);
933 (void) fprintf(stderr, _("You have insufficient privileges to "
934 "execute this command.\n"));
935 break;
936 default:
937 if (is_snap)
938 (void) fprintf(stderr, _("Unable to create snapshot "
939 "%s.\n"), snap_name);
940 else
941 (void) fprintf(stderr, _("Unable to create %s.\n"),
942 nbe_name);
943 (void) fprintf(stderr, "%s\n", be_err_to_str(err));
944 }
945
946 out:
947 nvlist_free(be_attrs);
948 out2:
949 nvlist_free(zfs_props);
950
951 return (err);
952 }
953
954 static int
955 be_do_destroy(int argc, char **argv)
956 {
957 nvlist_t *be_attrs;
958 boolean_t is_snap = B_FALSE;
959 boolean_t suppress_prompt = B_FALSE;
960 int err = 1;
961 int c;
962 int destroy_flags = 0;
963 char *snap_name;
964 char *be_name;
965
966 while ((c = getopt(argc, argv, "fFsv")) != -1) {
967 switch (c) {
968 case 'f':
|