summaryrefslogtreecommitdiffstats
path: root/sys-utils/setarch.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys-utils/setarch.c')
-rw-r--r--sys-utils/setarch.c14
1 files changed, 10 insertions, 4 deletions
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 [<arch>] [options] [<program> [<argument>...]]\n"), program_invocation_short_name);
+ fprintf(stdout, _(" %s [<arch>] [options] [<program> [<argument>...]]\n"), program_invocation_short_name);
else
- printf(_(" %s [options] [<program> [<argument>...]]\n"), program_invocation_short_name);
+ fprintf(stdout, _(" %s [options] [<program> [<argument>...]]\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);
}
@@ -271,6 +271,12 @@ static struct arch_domain *init_arch_domains(void)
{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},
{-1, NULL, NULL}