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 <bensberg@justemail.net>
This commit is contained in:
Benno Schulenberg 2015-01-10 14:41:32 +01:00 committed by Karel Zak
parent 4926bc3683
commit 1e098672f4
1 changed files with 1 additions and 1 deletions

View 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;
}