From: Benno Schulenberg Date: Sat, 10 Jan 2015 13:41:32 +0000 (+0100) Subject: setarch: differentiate between "unrecognized" and "cannot set" X-Git-Tag: v2.26-rc1~45 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1e098672f4a98abc2b0b387025a55e5f9821cba3;p=thirdparty%2Futil-linux.git setarch: differentiate between "unrecognized" and "cannot set" When the provided string does not match any architecture that setarch knows about, the response stays "Unrecognized architecture", but when trying to set the specified architecture does not have any effect, then respond with "Kernel cannot set architecture to...". Signed-off-by: Benno Schulenberg --- diff --git a/sys-utils/setarch.c b/sys-utils/setarch.c index 8e52179377..a09625c865 100644 --- a/sys-utils/setarch.c +++ b/sys-utils/setarch.c @@ -247,7 +247,7 @@ static int set_arch(const char *pers, unsigned long options, int list) && strcmp(un.machine, "i586") && strcmp(un.machine, "i686") && strcmp(un.machine, "athlon"))) - errx(EXIT_FAILURE, _("%s: Unrecognized architecture"), pers); + errx(EXIT_FAILURE, _("Kernel cannot set architecture to %s"), pers); } return 0; }