From d43277c534904dc31d14bfb0dc934f3cfbe2dab5 Mon Sep 17 00:00:00 2001 From: Blue Swirl Date: Wed, 1 Jul 2009 18:24:44 +0000 Subject: Fix missing strnlen problems Fix missing strnlen (a GNU extension) problems by using qemu_strnlen used for user emulators also for system emulators. Signed-off-by: Blue Swirl --- linux-user/uaccess.c | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'linux-user/uaccess.c') diff --git a/linux-user/uaccess.c b/linux-user/uaccess.c index 4d506935f8..a4d108c2f7 100644 --- a/linux-user/uaccess.c +++ b/linux-user/uaccess.c @@ -37,17 +37,6 @@ abi_long copy_to_user(abi_ulong gaddr, void *hptr, size_t len) return ret; } -/* XXX: use host strnlen if available ? */ -static int qemu_strnlen(const char *s, int max_len) -{ - int i; - for(i = 0; i < max_len; i++) { - if (s[i] == '\0') - break; - } - return i; -} - /* Return the length of a string in target memory or -TARGET_EFAULT if access error */ abi_long target_strlen(abi_ulong guest_addr1) -- cgit v1.2.3