crash/0004-LoongArch64-fix-incorrect-code-in-the-main.patch

45 lines
1.6 KiB
Diff
Raw Permalink Normal View History

From 38f26cc8b9304e79e7f8adb5fd8e6a533c70cfd2 Mon Sep 17 00:00:00 2001
From: Lianbo Jiang <lijiang@redhat.com>
Date: Tue, 6 Aug 2024 14:31:45 +0800
Subject: [PATCH 4/5] LoongArch64: fix incorrect code in the main()
The commit c3939d2e1930 contains incorrect code that starts with "+",
for example:
- !machine_type("S390X") && !machine_type("RISCV64"))
+ !machine_type("S390X") && !machine_type("RISCV64") &&
++ !machine_type("LOONGARCH64"))
See the main() in the main.c
...
} else if (STREQ(long_options[option_index].name, "kaslr")) {
if (!machine_type("X86_64") &&
!machine_type("ARM64") && !machine_type("X86") &&
!machine_type("S390X") && !machine_type("RISCV64") &&
+ !machine_type("LOONGARCH64"))
Let's remove it from the main().
Link: https://lists.crash-utility.osci.io/archives/list/devel@lists.crash-utility.osci.io/message/LH3IRUA6ZDVFZFLWKW5EWR3DKE6MY25Z/
Fixes: c3939d2e1930 ("LoongArch64: Add "--kaslr" command line option support")
Signed-off-by: Lianbo Jiang <lijiang@redhat.com>
---
main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/main.c b/main.c
index 0b6b927..71bcc15 100644
--- a/main.c
+++ b/main.c
@@ -229,7 +229,7 @@ main(int argc, char **argv)
if (!machine_type("X86_64") &&
!machine_type("ARM64") && !machine_type("X86") &&
!machine_type("S390X") && !machine_type("RISCV64") &&
-+ !machine_type("LOONGARCH64"))
+ !machine_type("LOONGARCH64"))
error(INFO, "--kaslr not valid "
"with this machine type.\n");
else if (STREQ(optarg, "auto"))
--
2.40.1