diff options
author | Juergen Lock <nox@FreeBSD.org> | 2010-01-17 16:20:56 +0000 |
---|---|---|
committer | Juergen Lock <nox@FreeBSD.org> | 2010-01-17 16:20:56 +0000 |
commit | d4e517700042730d5420402bec25ccfa88fed6c8 (patch) | |
tree | fa8e73dd336e8f03ab2c5b0677215cf74cc8885a /emulators/qemu-devel/files/patch-vl.c-ppbus | |
parent | Add cl-trivial-features, which ensures consistent *FEATURES* across multiple (diff) |
Finally bring qemu 0.12.1 into ports as the new emulators/qemu-devel,
release announcement is here:
http://lists.gnu.org/archive/html/qemu-devel/2009-12/msg02151.html
Quoting from pkg-message:
- kqemu is no longer supported in qemu upstream after the 0.11 branch
was created, which means also not in this version. (Linux has moved
on to kvm now for qemu(-like) virtualization needs, so if you want qemu
to go faster and don't want to switch to virtualbox or stick to the older
emulators/qemu port which is at 0.11.1 atm and as such still supports
kqemu you should help getting the FreeBSD kvm port updated and
completed:
http://wiki.freebsd.org/FabioChecconi/PortingLinuxKVMToFreeBSD
)
Notes
Notes:
svn path=/head/; revision=248018
Diffstat (limited to 'emulators/qemu-devel/files/patch-vl.c-ppbus')
-rw-r--r-- | emulators/qemu-devel/files/patch-vl.c-ppbus | 92 |
1 files changed, 0 insertions, 92 deletions
diff --git a/emulators/qemu-devel/files/patch-vl.c-ppbus b/emulators/qemu-devel/files/patch-vl.c-ppbus deleted file mode 100644 index 28cf485493d2..000000000000 --- a/emulators/qemu-devel/files/patch-vl.c-ppbus +++ /dev/null @@ -1,92 +0,0 @@ -Index: qemu/vl.c -@@ -78,8 +78,10 @@ - #endif - #ifdef __FreeBSD__ - #include <sys/param.h> - #include <sys/module.h> - #include <sys/linker.h> -+#include <dev/ppbus/ppi.h> -+#include <dev/ppbus/ppbconf.h> - #endif - - #if defined(CONFIG_SLIRP) -@@ -1728,7 +1730,64 @@ - chr->chr_ioctl = pp_ioctl; - return chr; - } --#endif /* defined(__linux__) */ -+#if defined(__FreeBSD__) -+static int pp_ioctl(CharDriverState *chr, int cmd, void *arg) -+{ -+ int fd = (int)chr->opaque; -+ uint8_t b; -+ -+ switch(cmd) { -+ case CHR_IOCTL_PP_READ_DATA: -+ if (ioctl(fd, PPIGDATA, &b) < 0) -+ return -ENOTSUP; -+ *(uint8_t *)arg = b; -+ break; -+ case CHR_IOCTL_PP_WRITE_DATA: -+ b = *(uint8_t *)arg; -+ if (ioctl(fd, PPISDATA, &b) < 0) -+ return -ENOTSUP; -+ break; -+ case CHR_IOCTL_PP_READ_CONTROL: -+ if (ioctl(fd, PPIGCTRL, &b) < 0) -+ return -ENOTSUP; -+ *(uint8_t *)arg = b; -+ break; -+ case CHR_IOCTL_PP_WRITE_CONTROL: -+ b = *(uint8_t *)arg; -+ if (ioctl(fd, PPISCTRL, &b) < 0) -+ return -ENOTSUP; -+ break; -+ case CHR_IOCTL_PP_READ_STATUS: -+ if (ioctl(fd, PPIGSTATUS, &b) < 0) -+ return -ENOTSUP; -+ *(uint8_t *)arg = b; -+ break; -+ default: -+ return -ENOTSUP; -+ } -+ return 0; -+} -+ -+CharDriverState *qemu_chr_open_pp(const char *filename) -+{ -+ CharDriverState *chr; -+ int fd; -+ -+ fd = open(filename, O_RDWR); -+ if (fd < 0) -+ return NULL; -+ -+ chr = qemu_mallocz(sizeof(CharDriverState)); -+ if (!chr) { -+ close(fd); -+ return NULL; -+ } -+ chr->opaque = (void *)fd; -+ chr->chr_write = null_chr_write; -+ chr->chr_ioctl = pp_ioctl; -+ return chr; -+} -+#endif - - #else - CharDriverState *qemu_chr_open_pty(void) -@@ -2562,6 +2622,13 @@ - #endif - #if defined(__linux__) - if (strstart(filename, "/dev/parport", NULL)) { -+ return qemu_chr_open_pp(filename); -+ } else -+ if (strstart(filename, "/dev/", NULL)) { -+ return qemu_chr_open_tty(filename); -+ } else -+#elif defined(__FreeBSD__) -+ if (strstart(filename, "/dev/ppi", NULL)) { - return qemu_chr_open_pp(filename); - } else - if (strstart(filename, "/dev/", NULL)) { |