diff --git a/doc/bookmarkctl.1 b/doc/bookmarkctl.1 index cf672c2..0e5d8f7 100644 --- a/doc/bookmarkctl.1 +++ b/doc/bookmarkctl.1 @@ -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 diff --git a/doc/bookmarkfs.texi b/doc/bookmarkfs.texi index 33d70c1..12b5f88 100644 --- a/doc/bookmarkfs.texi +++ b/doc/bookmarkfs.texi @@ -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. diff --git a/src/bookmarkctl.c b/src/bookmarkctl.c index 0033f85..25d4af3 100644 --- a/src/bookmarkctl.c +++ b/src/bookmarkctl.c @@ -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;