summaryrefslogtreecommitdiffstats
path: root/sys-utils/setarch.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-14 19:33:34 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-14 19:33:34 +0000
commit1272be04be0cb803eec87f602edb2e3e6f111aea (patch)
treebce17f6478cdd9f3c4ec3d751135dc42786d6a56 /sys-utils/setarch.c
parentReleasing progress-linux version 2.39.3-11~progress7.99u1. (diff)
downloadutil-linux-1272be04be0cb803eec87f602edb2e3e6f111aea.tar.xz
util-linux-1272be04be0cb803eec87f602edb2e3e6f111aea.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}