From 8bb05ac73a5b448b339ce0bc8d396c82c459b47f Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 14 Apr 2024 21:33:32 +0200 Subject: Merging upstream version 2.40. Signed-off-by: Daniel Baumann --- sys-utils/setarch.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'sys-utils/setarch.c') diff --git a/sys-utils/setarch.c b/sys-utils/setarch.c index 1a255e4..227bc6b 100644 --- a/sys-utils/setarch.c +++ b/sys-utils/setarch.c @@ -139,9 +139,9 @@ static void __attribute__((__noreturn__)) usage(int archwrapper) { fputs(USAGE_HEADER, stdout); if (!archwrapper) - printf(_(" %s [] [options] [ [...]]\n"), program_invocation_short_name); + fprintf(stdout, _(" %s [] [options] [ [...]]\n"), program_invocation_short_name); else - printf(_(" %s [options] [ [...]]\n"), program_invocation_short_name); + fprintf(stdout, _(" %s [options] [ [...]]\n"), program_invocation_short_name); fputs(USAGE_SEPARATOR, stdout); fputs(_("Change the reported architecture and set personality flags.\n"), stdout); @@ -167,8 +167,8 @@ static void __attribute__((__noreturn__)) usage(int archwrapper) } fputs(USAGE_SEPARATOR, stdout); - printf(USAGE_HELP_OPTIONS(26)); - printf(USAGE_MAN_TAIL("setarch(8)")); + fprintf(stdout, USAGE_HELP_OPTIONS(26)); + fprintf(stdout, USAGE_MAN_TAIL("setarch(8)")); exit(EXIT_SUCCESS); } @@ -270,6 +270,12 @@ static struct arch_domain *init_arch_domains(void) {PER_LINUX32, "arm", "arm"}, {PER_LINUX, "arm64", "aarch64"}, {PER_LINUX, "aarch64", "aarch64"}, +#endif +#if defined(__riscv) + {PER_LINUX32, "riscv32", "riscv32"}, + {PER_LINUX32, "rv32", "riscv32"}, + {PER_LINUX, "riscv64", "riscv64"}, + {PER_LINUX, "rv64", "riscv64"}, #endif /* place holder, will be filled up at runtime */ {-1, NULL, NULL}, -- cgit v1.2.3