diff options
Diffstat (limited to 'sys-utils')
| -rw-r--r-- | sys-utils/chmem.8.adoc | 4 | ||||
| -rw-r--r-- | sys-utils/chmem.c | 8 | ||||
| -rw-r--r-- | sys-utils/fstrim.c | 2 | ||||
| -rw-r--r-- | sys-utils/ipcrm.c | 31 | ||||
| -rw-r--r-- | sys-utils/ipcs.c | 4 | ||||
| -rw-r--r-- | sys-utils/ipcutils.c | 2 | ||||
| -rw-r--r-- | sys-utils/lsipc.c | 6 | ||||
| -rw-r--r-- | sys-utils/mount.8.adoc | 2 | ||||
| -rw-r--r-- | sys-utils/swapon.c | 4 |
9 files changed, 32 insertions, 31 deletions
diff --git a/sys-utils/chmem.8.adoc b/sys-utils/chmem.8.adoc index 029bc0832c..f30f3a3697 100644 --- a/sys-utils/chmem.8.adoc +++ b/sys-utils/chmem.8.adoc @@ -12,7 +12,7 @@ chmem - configure memory == SYNOPSIS -*chmem* [*-h] [*-V*] [*-v*] [*-e*|*-d*] [_SIZE_|_RANGE_ *-b* _BLOCKRANGE_] [*-z* _ZONE_] +*chmem* [*-h*] [*-V*] [*-v*] [*-e*|*-d*] [_SIZE_|_RANGE_|*-b* _BLOCKRANGE_] [*-z* _ZONE_] == DESCRIPTION @@ -64,7 +64,7 @@ failure *64*:: partial success -== EXAMPLE +== EXAMPLES *chmem --enable 1024*:: This command requests 1024 MiB of memory to be set online. diff --git a/sys-utils/chmem.c b/sys-utils/chmem.c index 4105d19695..5ff344fd3c 100644 --- a/sys-utils/chmem.c +++ b/sys-utils/chmem.c @@ -146,12 +146,12 @@ static int chmem_size(struct chmem_desc *desc, int enable, int zone_id) idxtostr(desc, index, str, sizeof(str)); rc = ul_path_writef_string(desc->sysmem, onoff, "%s/state", name); - if (rc != 0 && desc->verbose) { + if (rc != 0) { if (enable) - fprintf(stdout, _("%s enable failed\n"), str); + warn(_("%s enable failed"), str); else - fprintf(stdout, _("%s disable failed\n"), str); - } else if (rc == 0 && desc->verbose) { + warn(_("%s disable failed"), str); + } else if (desc->verbose) { if (enable) fprintf(stdout, _("%s enabled\n"), str); else diff --git a/sys-utils/fstrim.c b/sys-utils/fstrim.c index 2ae3480b8f..4d43c79572 100644 --- a/sys-utils/fstrim.c +++ b/sys-utils/fstrim.c @@ -451,7 +451,7 @@ static void __attribute__((__noreturn__)) usage(void) FILE *out = stdout; fputs(USAGE_HEADER, out); fprintf(out, - _(" %s [options] <-A|-a|mount point>\n"), program_invocation_short_name); + _(" %s [options] -A|-a|<mountpoint>\n"), program_invocation_short_name); fputs(USAGE_SEPARATOR, out); fputs(_("Discard unused blocks on a mounted filesystem.\n"), out); diff --git a/sys-utils/ipcrm.c b/sys-utils/ipcrm.c index 11adf2f80d..8ddb104f44 100644 --- a/sys-utils/ipcrm.c +++ b/sys-utils/ipcrm.c @@ -56,17 +56,18 @@ static void __attribute__((__noreturn__)) usage(void) fputs(_("Remove certain IPC resources.\n"), out); fputs(USAGE_OPTIONS, out); - fputs(_(" -m, --shmem-id <id> remove shared memory segment by id\n"), out); - fputs(_(" -M, --shmem-key <key> remove shared memory segment by key\n"), out); - fputs(_(" --posix-shmem <name> remove POSIX shared memory segment by name\n"), out); - fputs(_(" -q, --queue-id <id> remove message queue by id\n"), out); - fputs(_(" -Q, --queue-key <key> remove message queue by key\n"), out); - fputs(_(" --posix-mqueue <name> remove POSIX message queue by name\n"), out); - fputs(_(" -s, --semaphore-id <id> remove semaphore by id\n"), out); - fputs(_(" -S, --semaphore-key <key> remove semaphore by key\n"), out); - fputs(_(" --posix-semaphore <name> remove POSIX semaphore by name\n"), out); - fputs(_(" -a, --all[=shm|pshm|msg|pmsg|sem|psem] remove all (in the specified category)\n"), out); - fputs(_(" -v, --verbose explain what is being done\n"), out); + fputs(_(" -m, --shmem-id <id> remove shared memory segment by id\n"), out); + fputs(_(" -M, --shmem-key <key> remove shared memory segment by key\n"), out); + fputs(_(" --posix-shmem <name> remove POSIX shared memory segment by name\n"), out); + fputs(_(" -q, --queue-id <id> remove message queue by id\n"), out); + fputs(_(" -Q, --queue-key <key> remove message queue by key\n"), out); + fputs(_(" --posix-mqueue <name> remove POSIX message queue by name\n"), out); + fputs(_(" -s, --semaphore-id <id> remove semaphore by id\n"), out); + fputs(_(" -S, --semaphore-key <key> remove semaphore by key\n"), out); + fputs(_(" --posix-semaphore <name> remove POSIX semaphore by name\n"), out); + fputs(_(" -a, --all[=shm|pshm|msg|pmsg|sem|psem]\n" + " remove all (in the specified category)\n"), out); + fputs(_(" -v, --verbose explain what is being done\n"), out); fputs(USAGE_SEPARATOR, out); fprintf(out, USAGE_HELP_OPTIONS(28)); @@ -173,7 +174,7 @@ static int deprecated_main(int argc, char **argv) return 1; } -static unsigned long strtokey(const char *str, const char *errmesg) +static unsigned long strtokey(const char *str) { unsigned long num; char *end = NULL; @@ -190,9 +191,9 @@ static unsigned long strtokey(const char *str, const char *errmesg) return num; err: if (errno) - err(EXIT_FAILURE, "%s: '%s'", errmesg, str); + err(EXIT_FAILURE, _("failed to parse argument: '%s'"), str); else - errx(EXIT_FAILURE, "%s: '%s'", errmesg, str); + errx(EXIT_FAILURE, _("failed to parse argument: '%s'"), str); return 0; } @@ -200,7 +201,7 @@ static int key_to_id(type_id type, char *s) { int id; /* keys are in hex or decimal */ - key_t key = strtokey(s, "failed to parse argument"); + key_t key = strtokey(s); if (key == IPC_PRIVATE) { warnx(_("illegal key (%s)"), s); return -1; diff --git a/sys-utils/ipcs.c b/sys-utils/ipcs.c index e77a657dba..d30bc6ab64 100644 --- a/sys-utils/ipcs.c +++ b/sys-utils/ipcs.c @@ -75,8 +75,8 @@ static void __attribute__((__noreturn__)) usage(void) fputs(_("Show information on IPC facilities.\n"), out); fputs(USAGE_OPTIONS, out); - fputs(_(" -i, --id <id> print details on resource identified by <id>\n"), out); - fprintf(out, USAGE_HELP_OPTIONS(16)); + fputs(_(" -i, --id <id> print details on resource identified by <id>\n"), out); + fprintf(out, USAGE_HELP_OPTIONS(19)); fputs(USAGE_SEPARATOR, out); fputs(_("Resource options:\n"), out); diff --git a/sys-utils/ipcutils.c b/sys-utils/ipcutils.c index a755849fb5..e3da523b7c 100644 --- a/sys-utils/ipcutils.c +++ b/sys-utils/ipcutils.c @@ -677,7 +677,7 @@ int posix_ipc_msg_get_info(const char *name, struct posix_msg_data **msgds) } if (name && name[0] != '/') { - warnx(_("mqueue name must start with '/': %s"), name); + warnx(_("message queue name must start with '/': %s"), name); return -1; } diff --git a/sys-utils/lsipc.c b/sys-utils/lsipc.c index 133957ea9a..074dc4520d 100644 --- a/sys-utils/lsipc.c +++ b/sys-utils/lsipc.c @@ -784,7 +784,7 @@ static void do_posix_sem(const char *name, struct lsipc_control *ctl, if (retval < 1) { if (name != NULL) - warnx(_("mqueue %s not found"), name); + warnx(_("message queue %s not found"), name); return; } @@ -1010,7 +1010,7 @@ static void do_posix_msg(const char *name, struct lsipc_control *ctl, if (retval < 1) { if (name != NULL) - warnx(_("mqueue %s not found"), name); + warnx(_("message queue %s not found"), name); return; } @@ -1326,7 +1326,7 @@ static void do_posix_shm(const char *name, struct lsipc_control *ctl, struct lib if (retval < 1) { if (name != NULL) - warnx(_("shm %s not found"), name); + warnx(_("shared memory segment %s not found"), name); return; } diff --git a/sys-utils/mount.8.adoc b/sys-utils/mount.8.adoc index 4f23f8d1f0..5103b91c57 100644 --- a/sys-utils/mount.8.adoc +++ b/sys-utils/mount.8.adoc @@ -756,7 +756,7 @@ Allow to make a target directory (mountpoint) if it does not exist yet. The opti *X-mount.nocanonicalize*[**=**_type_]:: Allows disabling of canonicalization for mount source and target paths. By default, the `mount` command resolves all paths to their absolute paths without symlinks. However, this behavior may not be desired in certain situations, such as when binding a mount over a symlink, or a symlink over a directory or another symlink. The optional argument _type_ can be either "source" or "target" (mountpoint). If no _type_ is specified, then canonicalization is disabled for both types. This mount option does not affect the conversion of source tags (e.g. LABEL= or UUID=) and fstab processing. + -The command line option *--no-canonicalize* overrides this mount option and affects all path and tag conversions in all situations, but it does not modify flags for open_tree syscalls. +The command-line option *--no-canonicalize* overrides this mount option and affects all path and tag conversions in all situations, but for backward compatibility, it does not modify open_tree syscall flags and does not allow the bind-mount over a symlink use case. + Note that *mount*(8) still sanitizes and canonicalizes the source and target paths specified on the command line by non-root users, regardless of the X-mount.nocanonicalize setting. diff --git a/sys-utils/swapon.c b/sys-utils/swapon.c index 15efa481a2..83ec702d54 100644 --- a/sys-utils/swapon.c +++ b/sys-utils/swapon.c @@ -260,7 +260,8 @@ static int display_summary(void) if (!itr) err(EXIT_FAILURE, _("failed to initialize libmount iterator")); - /* TRANSLATORS: The tabs make each field a multiple of 8 characters. Keep aligned with each entry below. */ + /* TRANSLATORS: The tabs make each field a multiple of 8 characters. + * Please keep the translation aligned with the original. */ printf(_("Filename\t\t\t\tType\t\tSize\t\tUsed\t\tPriority\n")); while (mnt_table_next_fs(st, itr, &fs) == 0) { @@ -271,7 +272,6 @@ static int display_summary(void) off_t size = mnt_fs_get_size(fs); off_t used = mnt_fs_get_usedsize(fs); - /* TRANSLATORS: Keep each field a multiple of 8 characters and aligned with the header above. */ printf("%s%*s%s%s\t%jd%s\t%jd%s\t%d\n", src, srclen < 40 ? 40 - srclen : 1, " ", |
