aboutsummaryrefslogtreecommitdiffstats
path: root/qemu-char-android.c
diff options
context:
space:
mode:
authorDavid 'Digit' Turner <digit@android.com>2010-10-27 02:34:46 +0200
committerDavid 'Digit' Turner <digit@android.com>2010-10-27 02:34:46 +0200
commitdc46820125f5eaa0191193f5b71afba5f4915607 (patch)
tree084b1d512c6ee08126611d024185ab5fc4b4b45d /qemu-char-android.c
parent9690461f3f0a7710d8f1b364563395e2baadb085 (diff)
downloadexternal_qemu-dc46820125f5eaa0191193f5b71afba5f4915607.zip
external_qemu-dc46820125f5eaa0191193f5b71afba5f4915607.tar.gz
external_qemu-dc46820125f5eaa0191193f5b71afba5f4915607.tar.bz2
Allow OS X emulator to open host /dev/ devices.
Only Win32 does not allow this, so simplify the tests in the source code + Remove compiler warning Change-Id: I100dd59e4477edcd24dd94becfa3e3b83a2b92ab
Diffstat (limited to 'qemu-char-android.c')
-rw-r--r--qemu-char-android.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/qemu-char-android.c b/qemu-char-android.c
index 4074ea6..f97f9e8 100644
--- a/qemu-char-android.c
+++ b/qemu-char-android.c
@@ -891,9 +891,7 @@ static void cfmakeraw (struct termios *termios_p)
}
#endif
-#if defined(__linux__) || defined(__sun__) || defined(__FreeBSD__) \
- || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) \
- || defined(__GLIBC__)
+#ifndef _WIN32
typedef struct {
int fd;
@@ -1262,12 +1260,12 @@ static CharDriverState *qemu_chr_open_tty(const char *filename)
qemu_chr_reset(chr);
return chr;
}
-#else /* ! __linux__ && ! __sun__ */
+#else /* _WIN32 */
static CharDriverState *qemu_chr_open_pty(void)
{
return NULL;
}
-#endif /* __linux__ || __sun__ */
+#endif /* _WIN32 */
#if defined(__linux__)
typedef struct {
@@ -2367,12 +2365,9 @@ CharDriverState *qemu_chr_open(const char *label, const char *filename, void (*i
chr = qemu_chr_open_pp(filename);
} else
#endif
-#if defined(__linux__) || defined(__sun__) || defined(__FreeBSD__) \
- || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
if (strstart(filename, "/dev/", NULL)) {
chr = qemu_chr_open_tty(filename);
} else
-#endif
#else /* !_WIN32 */
if (strstart(filename, "COM", NULL)) {
chr = qemu_chr_open_win(filename);