mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2025-01-13 03:30:34 +03:00
Fix zfs "redact" misc issues
* zfs redact error messages do not end with newline character
* 30af21b0
inadvertently removed some ZFS_PROP comments
* man/zfs: zfs redact <redaction_snapshot> is not optional
Reviewed-by: Giuseppe Di Natale <guss80@gmail.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: George Melikov <mail@gmelikov.ru>
Signed-off-by: loli10K <ezomori.nozomu@gmail.com>
Closes #8988
This commit is contained in:
parent
341166c843
commit
3b5fe2c351
@ -3620,7 +3620,7 @@ zfs_do_redact(int argc, char **argv)
|
|||||||
argv++;
|
argv++;
|
||||||
argc--;
|
argc--;
|
||||||
if (argc < 3) {
|
if (argc < 3) {
|
||||||
(void) fprintf(stderr, gettext("too few arguments"));
|
(void) fprintf(stderr, gettext("too few arguments\n"));
|
||||||
usage(B_FALSE);
|
usage(B_FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3643,34 +3643,34 @@ zfs_do_redact(int argc, char **argv)
|
|||||||
break;
|
break;
|
||||||
case ENOENT:
|
case ENOENT:
|
||||||
(void) fprintf(stderr,
|
(void) fprintf(stderr,
|
||||||
gettext("provided snapshot %s does not exist"), snap);
|
gettext("provided snapshot %s does not exist\n"), snap);
|
||||||
break;
|
break;
|
||||||
case EEXIST:
|
case EEXIST:
|
||||||
(void) fprintf(stderr, gettext("specified redaction bookmark "
|
(void) fprintf(stderr, gettext("specified redaction bookmark "
|
||||||
"(%s) provided already exists"), bookname);
|
"(%s) provided already exists\n"), bookname);
|
||||||
break;
|
break;
|
||||||
case ENAMETOOLONG:
|
case ENAMETOOLONG:
|
||||||
(void) fprintf(stderr, gettext("provided bookmark name cannot "
|
(void) fprintf(stderr, gettext("provided bookmark name cannot "
|
||||||
"be used, final name would be too long"));
|
"be used, final name would be too long\n"));
|
||||||
break;
|
break;
|
||||||
case E2BIG:
|
case E2BIG:
|
||||||
(void) fprintf(stderr, gettext("too many redaction snapshots "
|
(void) fprintf(stderr, gettext("too many redaction snapshots "
|
||||||
"specified"));
|
"specified\n"));
|
||||||
break;
|
break;
|
||||||
case EINVAL:
|
case EINVAL:
|
||||||
(void) fprintf(stderr, gettext("redaction snapshot must be "
|
(void) fprintf(stderr, gettext("redaction snapshot must be "
|
||||||
"descendent of snapshot being redacted"));
|
"descendent of snapshot being redacted\n"));
|
||||||
break;
|
break;
|
||||||
case EALREADY:
|
case EALREADY:
|
||||||
(void) fprintf(stderr, gettext("attempted to redact redacted "
|
(void) fprintf(stderr, gettext("attempted to redact redacted "
|
||||||
"dataset or with respect to redacted dataset"));
|
"dataset or with respect to redacted dataset\n"));
|
||||||
break;
|
break;
|
||||||
case ENOTSUP:
|
case ENOTSUP:
|
||||||
(void) fprintf(stderr, gettext("redaction bookmarks feature "
|
(void) fprintf(stderr, gettext("redaction bookmarks feature "
|
||||||
"not enabled"));
|
"not enabled\n"));
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
(void) fprintf(stderr, gettext("internal error: %s"),
|
(void) fprintf(stderr, gettext("internal error: %s\n"),
|
||||||
strerror(errno));
|
strerror(errno));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -118,11 +118,11 @@ typedef enum {
|
|||||||
ZFS_PROP_PRIVATE, /* not exposed to user, temporary */
|
ZFS_PROP_PRIVATE, /* not exposed to user, temporary */
|
||||||
ZFS_PROP_ACLINHERIT,
|
ZFS_PROP_ACLINHERIT,
|
||||||
ZFS_PROP_CREATETXG,
|
ZFS_PROP_CREATETXG,
|
||||||
ZFS_PROP_NAME,
|
ZFS_PROP_NAME, /* not exposed to the user */
|
||||||
ZFS_PROP_CANMOUNT,
|
ZFS_PROP_CANMOUNT,
|
||||||
ZFS_PROP_ISCSIOPTIONS,
|
ZFS_PROP_ISCSIOPTIONS, /* not exposed to the user */
|
||||||
ZFS_PROP_XATTR,
|
ZFS_PROP_XATTR,
|
||||||
ZFS_PROP_NUMCLONES,
|
ZFS_PROP_NUMCLONES, /* not exposed to the user */
|
||||||
ZFS_PROP_COPIES,
|
ZFS_PROP_COPIES,
|
||||||
ZFS_PROP_VERSION,
|
ZFS_PROP_VERSION,
|
||||||
ZFS_PROP_UTF8ONLY,
|
ZFS_PROP_UTF8ONLY,
|
||||||
@ -140,12 +140,12 @@ typedef enum {
|
|||||||
ZFS_PROP_USEDDS,
|
ZFS_PROP_USEDDS,
|
||||||
ZFS_PROP_USEDCHILD,
|
ZFS_PROP_USEDCHILD,
|
||||||
ZFS_PROP_USEDREFRESERV,
|
ZFS_PROP_USEDREFRESERV,
|
||||||
ZFS_PROP_USERACCOUNTING,
|
ZFS_PROP_USERACCOUNTING, /* not exposed to the user */
|
||||||
ZFS_PROP_STMF_SHAREINFO,
|
ZFS_PROP_STMF_SHAREINFO, /* not exposed to the user */
|
||||||
ZFS_PROP_DEFER_DESTROY,
|
ZFS_PROP_DEFER_DESTROY,
|
||||||
ZFS_PROP_USERREFS,
|
ZFS_PROP_USERREFS,
|
||||||
ZFS_PROP_LOGBIAS,
|
ZFS_PROP_LOGBIAS,
|
||||||
ZFS_PROP_UNIQUE,
|
ZFS_PROP_UNIQUE, /* not exposed to the user */
|
||||||
ZFS_PROP_OBJSETID,
|
ZFS_PROP_OBJSETID,
|
||||||
ZFS_PROP_DEDUP,
|
ZFS_PROP_DEDUP,
|
||||||
ZFS_PROP_MLSLABEL,
|
ZFS_PROP_MLSLABEL,
|
||||||
@ -156,7 +156,7 @@ typedef enum {
|
|||||||
ZFS_PROP_CLONES,
|
ZFS_PROP_CLONES,
|
||||||
ZFS_PROP_LOGICALUSED,
|
ZFS_PROP_LOGICALUSED,
|
||||||
ZFS_PROP_LOGICALREFERENCED,
|
ZFS_PROP_LOGICALREFERENCED,
|
||||||
ZFS_PROP_INCONSISTENT,
|
ZFS_PROP_INCONSISTENT, /* not exposed to the user */
|
||||||
ZFS_PROP_VOLMODE,
|
ZFS_PROP_VOLMODE,
|
||||||
ZFS_PROP_FILESYSTEM_LIMIT,
|
ZFS_PROP_FILESYSTEM_LIMIT,
|
||||||
ZFS_PROP_SNAPSHOT_LIMIT,
|
ZFS_PROP_SNAPSHOT_LIMIT,
|
||||||
|
@ -236,7 +236,7 @@
|
|||||||
.Nm
|
.Nm
|
||||||
.Cm redact
|
.Cm redact
|
||||||
.Ar snapshot redaction_bookmark
|
.Ar snapshot redaction_bookmark
|
||||||
.Op Ar redaction_snapshot Ns ...
|
.Ar redaction_snapshot Ns ...
|
||||||
.Nm
|
.Nm
|
||||||
.Cm allow
|
.Cm allow
|
||||||
.Ar filesystem Ns | Ns Ar volume
|
.Ar filesystem Ns | Ns Ar volume
|
||||||
@ -4274,7 +4274,7 @@ deleting its saved partially received state.
|
|||||||
.Nm
|
.Nm
|
||||||
.Cm redact
|
.Cm redact
|
||||||
.Ar snapshot redaction_bookmark
|
.Ar snapshot redaction_bookmark
|
||||||
.Op Ar redaction_snapshot Ns ...
|
.Ar redaction_snapshot Ns ...
|
||||||
.Xc
|
.Xc
|
||||||
Generate a new redaction bookmark.
|
Generate a new redaction bookmark.
|
||||||
In addition to the typical bookmark information, a redaction bookmark contains
|
In addition to the typical bookmark information, a redaction bookmark contains
|
||||||
|
Loading…
Reference in New Issue
Block a user