summaryrefslogtreecommitdiffstats
path: root/sys-utils/setarch.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-14 19:33:32 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-14 19:33:32 +0000
commit8bb05ac73a5b448b339ce0bc8d396c82c459b47f (patch)
tree1fdda006866bca20d41cb206767ea5241e36852f /sys-utils/setarch.c
parentAdding debian version 2.39.3-11. (diff)
downloadutil-linux-8bb05ac73a5b448b339ce0bc8d396c82c459b47f.tar.xz
util-linux-8bb05ac73a5b448b339ce0bc8d396c82c459b47f.zip
Merging upstream version 2.40.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
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}