{
BlockDriver *drv1;
char protocol[128];
- int len = strnlen(filename, 127)+1;
+ int len = qemu_strnlen(filename, 127) + 1;
const char *p;
#ifdef _WIN32
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)
return 1;
}
+/* XXX: use host strnlen if available ? */
+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;
+}
+
time_t mktimegm(struct tm *tm)
{
time_t t;
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)
char *pstrcat(char *buf, int buf_size, const char *s);
int strstart(const char *str, const char *val, const char **ptr);
int stristart(const char *str, const char *val, const char **ptr);
+int qemu_strnlen(const char *s, int max_len);
time_t mktimegm(struct tm *tm);
int qemu_fls(int i);