From: Benno Schulenberg Date: Wed, 9 Jul 2025 09:07:33 +0000 (+0200) Subject: textual: harmonize the messages for an invalid size, length, and offset X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=325a26999545afb0e55949d62ab28036560c8b4c;p=thirdparty%2Futil-linux.git textual: harmonize the messages for an invalid size, length, and offset The added words "argument" or "value" or "specified" don't make things clearer and are just unneeded verbosity. Also, use all lowercase. Signed-off-by: Benno Schulenberg --- diff --git a/disk-utils/addpart.c b/disk-utils/addpart.c index 6bdb33662..5f45bbc3a 100644 --- a/disk-utils/addpart.c +++ b/disk-utils/addpart.c @@ -69,7 +69,7 @@ int main(int argc, char **argv) if (partx_add_partition(fd, strtou32_or_err(argv[2], _("invalid partition number argument")), strtou64_or_err(argv[3], _("invalid start argument")), - strtou64_or_err(argv[4], _("invalid length argument")))) + strtou64_or_err(argv[4], _("invalid length")))) err(EXIT_FAILURE, _("failed to add partition")); return EXIT_SUCCESS; diff --git a/disk-utils/mkswap.c b/disk-utils/mkswap.c index 609ecadd0..3cb7a043b 100644 --- a/disk-utils/mkswap.c +++ b/disk-utils/mkswap.c @@ -641,10 +641,10 @@ int main(int argc, char **argv) break; case 'o': ctl.offset = str2unum_or_err(optarg, - 10, _("Invalid offset"), SINT_MAX(off_t)); + 10, _("invalid offset"), SINT_MAX(off_t)); break; case 's': - ctl.filesz = strtosize_or_err(optarg, _("Invalid size")); + ctl.filesz = strtosize_or_err(optarg, _("invalid size")); break; case 'F': ctl.file = 1; diff --git a/disk-utils/resizepart.c b/disk-utils/resizepart.c index e29021b37..798dd3079 100644 --- a/disk-utils/resizepart.c +++ b/disk-utils/resizepart.c @@ -118,7 +118,7 @@ int main(int argc, char **argv) wholedisk, argv[2]); if (partx_resize_partition(fd, partno, start, - strtou64_or_err(argv[3], _("invalid length argument")))) + strtou64_or_err(argv[3], _("invalid length")))) err(EXIT_FAILURE, _("failed to resize partition")); if (close_fd(fd) != 0) diff --git a/misc-utils/blkid.c b/misc-utils/blkid.c index 63e61b5fa..3960b0d97 100644 --- a/misc-utils/blkid.c +++ b/misc-utils/blkid.c @@ -813,7 +813,7 @@ int main(int argc, char **argv) errx(BLKID_EXIT_OTHER, _("unsupported output format %s"), optarg); break; case 'O': - ctl.offset = strtosize_or_err(optarg, _("invalid offset argument")); + ctl.offset = strtosize_or_err(optarg, _("invalid offset")); break; case 'p': ctl.lowprobe_superblocks = 1; @@ -826,7 +826,7 @@ int main(int argc, char **argv) ctl.show[numtag++] = optarg; break; case 'S': - ctl.size = strtosize_or_err(optarg, _("invalid size argument")); + ctl.size = strtosize_or_err(optarg, _("invalid size")); break; case 't': if (search_type) { diff --git a/misc-utils/fadvise.c b/misc-utils/fadvise.c index abbc3a62d..da7fc691a 100644 --- a/misc-utils/fadvise.c +++ b/misc-utils/fadvise.c @@ -111,11 +111,11 @@ int main(int argc, char ** argv) break; case 'l': len = strtosize_or_err(optarg, - _("invalid length argument")); + _("invalid length")); break; case 'o': offset = strtosize_or_err(optarg, - _("invalid offset argument")); + _("invalid offset")); break; case 'V': print_version(EXIT_SUCCESS); diff --git a/misc-utils/lsclocks.c b/misc-utils/lsclocks.c index 435894182..3fdec7ef2 100644 --- a/misc-utils/lsclocks.c +++ b/misc-utils/lsclocks.c @@ -266,7 +266,7 @@ static int64_t get_namespace_offset(const char *name) space = strchr(line, ' '); if (space) *space = '\0'; - ret = strtos64_or_err(line, _("Invalid offset")); + ret = strtos64_or_err(line, _("invalid offset")); break; } diff --git a/misc-utils/pipesz.c b/misc-utils/pipesz.c index 0d1a2fc92..8a3da8612 100644 --- a/misc-utils/pipesz.c +++ b/misc-utils/pipesz.c @@ -269,7 +269,7 @@ int main(int argc, char **argv) opt_quiet = TRUE; break; case 's': - sz = strtosize_or_err(optarg, _("invalid size argument")); + sz = strtosize_or_err(optarg, _("invalid size")); opt_size = sz >= INT_MAX ? INT_MAX : (int)sz; ++n_opt_size; break; diff --git a/misc-utils/wipefs.c b/misc-utils/wipefs.c index a215088a4..b712ce700 100644 --- a/misc-utils/wipefs.c +++ b/misc-utils/wipefs.c @@ -737,7 +737,7 @@ main(int argc, char **argv) break; case 'o': add_offset(&ctl.offsets, strtosize_or_err(optarg, - _("invalid offset argument"))); + _("invalid offset"))); break; case 'p': ctl.parsable = 1; diff --git a/sys-utils/fallocate.c b/sys-utils/fallocate.c index 7b65481cc..13bf52915 100644 --- a/sys-utils/fallocate.c +++ b/sys-utils/fallocate.c @@ -386,16 +386,16 @@ int main(int argc, char **argv) if (length == -2LL) length = 0; if (length < 0) - errx(EXIT_FAILURE, _("invalid length value specified")); + errx(EXIT_FAILURE, _("invalid length")); } else { /* it's safer to require the range specification (--length --offset) */ if (length == -2LL) errx(EXIT_FAILURE, _("no length argument specified")); if (length <= 0) - errx(EXIT_FAILURE, _("invalid length value specified")); + errx(EXIT_FAILURE, _("invalid length")); } if (offset < 0) - errx(EXIT_FAILURE, _("invalid offset value specified")); + errx(EXIT_FAILURE, _("invalid offset")); /* O_CREAT makes sense only for the default fallocate(2) behavior * when mode is no specified and new space is allocated */