aboutsummaryrefslogtreecommitdiff
path: root/qemu-char.c
diff options
context:
space:
mode:
authorblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>2009-03-07 20:06:23 +0000
committerblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>2009-03-07 20:06:23 +0000
commitc5e97233e8c8e53aab1b80b5e9891a71c4edea3e (patch)
tree6bf1eb8605f56e1f1647df85e4351a24e763895f /qemu-char.c
parent9399f095bd742ef8dc0f1b08baa3893d9bdbeebc (diff)
Support for DragonFly BSD (Hasso Tepper)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6746 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'qemu-char.c')
-rw-r--r--qemu-char.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/qemu-char.c b/qemu-char.c
index 26e8825fec..566a0baabf 100644
--- a/qemu-char.c
+++ b/qemu-char.c
@@ -67,6 +67,10 @@
#include <libutil.h>
#include <dev/ppbus/ppi.h>
#include <dev/ppbus/ppbconf.h>
+#elif defined(__DragonFly__)
+#include <libutil.h>
+#include <dev/misc/ppi/ppi.h>
+#include <bus/ppbus/ppbconf.h>
#else
#include <util.h>
#endif
@@ -806,7 +810,7 @@ void cfmakeraw (struct termios *termios_p)
#endif
#if defined(__linux__) || defined(__sun__) || defined(__FreeBSD__) \
- || defined(__NetBSD__) || defined(__OpenBSD__)
+ || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
typedef struct {
int fd;
@@ -934,7 +938,7 @@ static CharDriverState *qemu_chr_open_pty(void)
PtyCharDriver *s;
struct termios tty;
int slave_fd, len;
-#if defined(__OpenBSD__)
+#if defined(__OpenBSD__) || defined(__DragonFly__)
char pty_name[PATH_MAX];
#define q_ptsname(x) pty_name
#else
@@ -1280,7 +1284,7 @@ static CharDriverState *qemu_chr_open_pp(const char *filename)
}
#endif /* __linux__ */
-#if defined(__FreeBSD__)
+#if defined(__FreeBSD__) || defined(__DragonFly__)
static int pp_ioctl(CharDriverState *chr, int cmd, void *arg)
{
int fd = (int)chr->opaque;
@@ -2153,13 +2157,13 @@ CharDriverState *qemu_chr_open(const char *label, const char *filename, void (*i
if (strstart(filename, "/dev/parport", NULL)) {
chr = qemu_chr_open_pp(filename);
} else
-#elif defined(__FreeBSD__)
+#elif defined(__FreeBSD__) || defined(__DragonFly__)
if (strstart(filename, "/dev/ppi", NULL)) {
chr = qemu_chr_open_pp(filename);
} else
#endif
#if defined(__linux__) || defined(__sun__) || defined(__FreeBSD__) \
- || defined(__NetBSD__) || defined(__OpenBSD__)
+ || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
if (strstart(filename, "/dev/", NULL)) {
chr = qemu_chr_open_tty(filename);
} else