From: Benno Schulenberg Date: Tue, 9 Dec 2025 15:02:21 +0000 (+0100) Subject: chmem: do not word a configuration failure as an instruction to the user X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0710b8ed830bbf8d07b6a196811fe15e24d0182c;p=thirdparty%2Futil-linux.git chmem: do not word a configuration failure as an instruction to the user When the current machine does not support configuring/deconfiguring memory, simply report that it cannot be done, instead of seemingly telling the user to skip the configuring/deconfiguring. Also, there is no need to mention `chmem` in the message: mentioning just the recommended option (-e or -d) is enough. Also, consistently terminate all four messages with a period. This improves upon commit ab2e709600 ("chmem: improve messages"). CC: Sumanth Korikkar Signed-off-by: Benno Schulenberg --- diff --git a/sys-utils/chmem.c b/sys-utils/chmem.c index 6ec66bb6b..dcec888d1 100644 --- a/sys-utils/chmem.c +++ b/sys-utils/chmem.c @@ -325,10 +325,10 @@ static int chmem_config_size(struct chmem_desc *desc, int configure) if (!desc->have_memconfig) { if (configure) fprintf(stdout, - _("Skip configuration. Use chmem -e instead.\n")); + _("Cannot configure. Use -e instead.\n")); else fprintf(stdout, - _("Skip deconfiguration. Use chmem -d instead\n")); + _("Cannot deconfigure. Use -d instead.\n")); return -1; } size = desc->size; @@ -363,10 +363,10 @@ static int chmem_config_range(struct chmem_desc *desc, int configure) if (!desc->have_memconfig) { if (configure) fprintf(stdout, - _("Skip configuration. Use chmem -e instead.\n")); + _("Cannot configure. Use -e instead.\n")); else fprintf(stdout, - _("Skip deconfiguration. Use chmem -d instead\n")); + _("Cannot deconfigure. Use -d instead.\n")); return -1; } todo = desc->end - desc->start + 1;