[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 13/19] tests/tcg/i386: Fix hello-i386 test
From: |
Pranith Kumar |
Subject: |
[Qemu-devel] [PATCH 13/19] tests/tcg/i386: Fix hello-i386 test |
Date: |
Thu, 1 Dec 2016 00:14:27 -0500 |
Include a missing header and rename the function names to avoid
definition mis-match.
Signed-off-by: Pranith Kumar <address@hidden>
---
tests/tcg/hello-i386.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/tests/tcg/hello-i386.c b/tests/tcg/hello-i386.c
index fa00380..4a46f80 100644
--- a/tests/tcg/hello-i386.c
+++ b/tests/tcg/hello-i386.c
@@ -1,6 +1,7 @@
#include <asm/unistd.h>
+#include <stddef.h>
-static inline void exit(int status)
+static inline void _exit(int status)
{
int __res;
__asm__ volatile ("movl %%ecx,%%ebx\n"\
@@ -8,7 +9,7 @@ static inline void exit(int status)
: "=a" (__res) : "0" (__NR_exit),"c" ((long)(status)));
}
-static inline int write(int fd, const char * buf, int len)
+static inline int _write(int fd, const char * buf, int len)
{
int status;
__asm__ volatile ("pushl %%ebx\n"\
@@ -22,6 +23,6 @@ static inline int write(int fd, const char * buf, int len)
void _start(void)
{
- write(1, "Hello World\n", 12);
- exit(0);
+ _write(1, "Hello World\n", 12);
+ _exit(0);
}
--
2.10.2
- Re: [Qemu-devel] [PATCH 03/19] check-help: add some hint to run a single test, (continued)
- [Qemu-devel] [PATCH 07/19] linux-test: fix set/getitimer returned timer check, Pranith Kumar, 2016/12/01
- [Qemu-devel] [PATCH 06/19] linux-test: fix build, Pranith Kumar, 2016/12/01
- [Qemu-devel] [PATCH 08/19] Fix test-i386-fprem compilation, Pranith Kumar, 2016/12/01
- [Qemu-devel] [PATCH 09/19] test-i386: modernize vector code v4sf, Pranith Kumar, 2016/12/01
- [Qemu-devel] [PATCH 10/19] tests/tcg: Move arm tests to arch specific folder, Pranith Kumar, 2016/12/01
- [Qemu-devel] [PATCH 12/19] tests/tcg: Add tests-tcg hook in Makefile, Pranith Kumar, 2016/12/01
- [Qemu-devel] [PATCH 14/19] tests/tcg: Move i386 tests to arch specific folder, Pranith Kumar, 2016/12/01
- [Qemu-devel] [PATCH 11/19] tests/tcg: Move mips test to arch specific folder, Pranith Kumar, 2016/12/01
- [Qemu-devel] [PATCH 13/19] tests/tcg/i386: Fix hello-i386 test,
Pranith Kumar <=
- [Qemu-devel] [PATCH 16/19] tests/tcg: Fix compilation of linux-test.c, Pranith Kumar, 2016/12/01
- [Qemu-devel] [PATCH 15/19] tests/tcg/i386: Fix test-i386 compilation, Pranith Kumar, 2016/12/01
- [Qemu-devel] [PATCH 17/19] tests/tcg: Move independent tests to misc dir, Pranith Kumar, 2016/12/01
- [Qemu-devel] [PATCH 19/19] tests/tcg: test-i386.c: Fix format warnings, Pranith Kumar, 2016/12/01
- [Qemu-devel] [PATCH 18/19] tests/tcg: Add and update Makefiles, Pranith Kumar, 2016/12/01
- Re: [Qemu-devel] [PATCH v5 00/19] Cleanup of TCG tests, Peter Maydell, 2016/12/01