]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
setarch: differentiate between "unrecognized" and "cannot set"
authorBenno Schulenberg <bensberg@justemail.net>
Sat, 10 Jan 2015 13:41:32 +0000 (14:41 +0100)
committerKarel Zak <kzak@redhat.com>
Mon, 12 Jan 2015 10:28:21 +0000 (11:28 +0100)
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 <bensberg@justemail.net>
sys-utils/setarch.c

index 8e521793771c68e9adf70823bb33242c1d71e972..a09625c8650440efaca53d1f01bf372fdd8e15a8 100644 (file)
@@ -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;
 }