setarch: don't return address of automatic variable
PATCH 1/1 setarch: don't return address of automatic variable
On architectures without special personalities setarch uses the contents of a local variable with automatic storage duration after return from the function, causing it to report a spurious error.
$ setarch m68k setarch: Kernel cannot set architecture to m68k
Signed-off-by Andreas Schwab <[email protected]>
--- sys-utils/setarch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sys-utils/setarch.c +1 -1
@@ -131,7 +131,7 @@ static void __attribute__((__noreturn__)) usage(int archwrapper)*/ static struct arch_domain *init_arch_domains (void ) { -struct utsname un; +static struct utsname un;size_t i; static struct arch_domain transitions[] =
Signature · 7 lines
2.20.1 -- Andreas Schwab, [email protected] GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different."
Quoted 2 lines · Andreas Schwab
sys-utils/setarch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Applied, thanks.
Signature · 2 lines
Karel Zak <[email protected]> http://karelzak.blogspot.com