projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2d7481e
)
selftests/nolibc: simplify call to ioperm
author
Thomas Weißschuh
<linux@weissschuh.net>
Mon, 3 Jul 2023 08:11:08 +0000
(10:11 +0200)
committer
Willy Tarreau
<w@1wt.eu>
Wed, 23 Aug 2023 02:38:02 +0000
(
04:38
+0200)
Since commit
53fcfafa8c5c
("tools/nolibc/unistd: add syscall()") nolibc
has support for syscall(2).
Use it to get rid of some ifdef-ery.
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Signed-off-by: Willy Tarreau <w@1wt.eu>
tools/testing/selftests/nolibc/nolibc-test.c
patch
|
blob
|
history
diff --git
a/tools/testing/selftests/nolibc/nolibc-test.c
b/tools/testing/selftests/nolibc/nolibc-test.c
index 486334981e601582204e870165fe5830256ac86e..c02d89953679c020c9c229c043e1a002cb5f6dce 100644
(file)
--- a/
tools/testing/selftests/nolibc/nolibc-test.c
+++ b/
tools/testing/selftests/nolibc/nolibc-test.c
@@
-1051,11
+1051,7
@@
int main(int argc, char **argv, char **envp)
* exit with status code 2N+1 when N is written to 0x501. We
* hard-code the syscall here as it's arch-dependent.
*/
-#if defined(_NOLIBC_SYS_H)
- else if (my_syscall3(__NR_ioperm, 0x501, 1, 1) == 0)
-#else
- else if (ioperm(0x501, 1, 1) == 0)
-#endif
+ else if (syscall(__NR_ioperm, 0x501, 1, 1) == 0)
__asm__ volatile ("outb %%al, %%dx" :: "d"(0x501), "a"(0));
/* if it does nothing, fall back to the regular panic */
#endif