mirror of
https://git.sr.ht/~cismonx/bookmarkfs
synced 2025-06-07 11:48:51 +00:00
bookmarkctl: xattr-get: rename -m
option to -a
This commit is contained in:
parent
b5fa6960ef
commit
eb426f9fc4
3 changed files with 9 additions and 9 deletions
|
@ -32,7 +32,7 @@ bookmarkctl - manage a mounted BookmarkFS filesystem
|
|||
.B bookmarkctl
|
||||
.B xattr\-get
|
||||
.RI [ options ]
|
||||
.B \-m
|
||||
.B \-a
|
||||
.IR attrname "... " pathname
|
||||
.PP
|
||||
.B bookmarkctl
|
||||
|
@ -145,7 +145,7 @@ Treat the value as binary, and print it verbatim.
|
|||
.IP
|
||||
If this option is not provided, non-printable characters are replaced with '?'.
|
||||
.TP
|
||||
.B \-m
|
||||
.B \-a
|
||||
Switch to multi-attrname mode, where multiple extended attribute names
|
||||
can be specified instead of multiple files.
|
||||
.IP
|
||||
|
|
|
@ -630,7 +630,7 @@ Displays extended attribute values.
|
|||
|
||||
@example
|
||||
bookmarkctl xattr-get [@var{options}] @var{attrname} @var{pathname}...
|
||||
bookmarkctl xattr-get [@var{options}] -m @var{attrname}... @var{pathname}
|
||||
bookmarkctl xattr-get [@var{options}] -a @var{attrname}... @var{pathname}
|
||||
@end example
|
||||
|
||||
@table @var
|
||||
|
@ -650,7 +650,7 @@ Treat the value as binary, and print it verbatim.
|
|||
If this option is not provided, non-printable characters are replaced with
|
||||
@samp{?}.
|
||||
|
||||
@item -m
|
||||
@item -a
|
||||
Switch to multi-attrname mode, where multiple extended attribute names
|
||||
can be specified instead of multiple files.
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@ struct xattr_get_ctx {
|
|||
char eol;
|
||||
|
||||
unsigned binary : 1;
|
||||
unsigned multi_name : 1;
|
||||
unsigned multi_attr : 1;
|
||||
};
|
||||
|
||||
// Forward declaration start
|
||||
|
@ -249,8 +249,8 @@ subcmd_xattr_get (
|
|||
ctx.binary = 1;
|
||||
break;
|
||||
}
|
||||
OPT_OPT('m') {
|
||||
ctx.multi_name = 1;
|
||||
OPT_OPT('a') {
|
||||
ctx.multi_attr = 1;
|
||||
break;
|
||||
}
|
||||
OPT_OPT('q') {
|
||||
|
@ -269,7 +269,7 @@ subcmd_xattr_get (
|
|||
return -1;
|
||||
}
|
||||
|
||||
if (ctx.multi_name) {
|
||||
if (ctx.multi_attr) {
|
||||
return xattr_get_one(argv[argc - 1], argv, argc - 1, &ctx);
|
||||
}
|
||||
for (int i = 1; i < argc; ++i) {
|
||||
|
@ -416,7 +416,7 @@ xattr_get_one (
|
|||
for (int i = 0; i < names_cnt; ++i) {
|
||||
char const *name = names[i];
|
||||
|
||||
ctx->prefix = ctx->multi_name ? name : path;
|
||||
ctx->prefix = ctx->multi_attr ? name : path;
|
||||
status = bookmarkfs_xattr_get(fd, name, xattr_get_cb, ctx);
|
||||
if (status < 0) {
|
||||
goto end;
|
||||
|
|
Loading…
Add table
Reference in a new issue