summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuca Barbato <lu_zero@gentoo.org>2005-04-28 13:26:38 +0000
committerLuca Barbato <lu_zero@gentoo.org>2005-04-28 13:26:38 +0000
commit8584dc55439ec460d02fefa97d348dbdb2819b8e (patch)
tree7df9f204a967e00b673b1b833678e2ad707e09fb /app-emulation/qemu/files
parentKQEMU license (diff)
downloadhistorical-8584dc55439ec460d02fefa97d348dbdb2819b8e.tar.gz
historical-8584dc55439ec460d02fefa97d348dbdb2819b8e.tar.bz2
historical-8584dc55439ec460d02fefa97d348dbdb2819b8e.zip
New version
Package-Manager: portage-2.0.51.20-r5
Diffstat (limited to 'app-emulation/qemu/files')
-rw-r--r--app-emulation/qemu/files/digest-qemu-0.7.02
-rw-r--r--app-emulation/qemu/files/kqemu-sysfs.patch77
2 files changed, 79 insertions, 0 deletions
diff --git a/app-emulation/qemu/files/digest-qemu-0.7.0 b/app-emulation/qemu/files/digest-qemu-0.7.0
new file mode 100644
index 000000000000..279f446285f5
--- /dev/null
+++ b/app-emulation/qemu/files/digest-qemu-0.7.0
@@ -0,0 +1,2 @@
+MD5 234e9ace03b00259bb57dc5a9c633056 qemu-0.7.0.tar.gz 1211802
+MD5 c6bb3b40fb3d526d731eb0f1f9dee7ee kqemu-0.6.2-1.tar.gz 21002
diff --git a/app-emulation/qemu/files/kqemu-sysfs.patch b/app-emulation/qemu/files/kqemu-sysfs.patch
new file mode 100644
index 000000000000..05c49ca67898
--- /dev/null
+++ b/app-emulation/qemu/files/kqemu-sysfs.patch
@@ -0,0 +1,77 @@
+--- kqemu/kmod.c 2005-02-10 23:09:09.000000000 +0100
++++ kqemu/kmod-sysfs.c 2005-02-22 19:46:44.000000000 +0100
+@@ -15,7 +15,10 @@
+ #include <asm/processor.h>
+ #include <asm/uaccess.h>
+ #include <asm/io.h>
+-
++#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,0)
++#include <linux/device.h>
++#endif
++#include <linux/devfs_fs_kernel.h>
+ #include "kqemu.h"
+
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,19)
+@@ -34,6 +37,10 @@
+ int page_alloc_count;
+ #endif
+
++#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,0)
++static struct class_simple *kqemu_class;
++#endif
++
+ /* lock the page at virtual address 'user_addr' and return its
+ page index. Return -1 if error */
+ unsigned long CDECL kqemu_lock_user_page(unsigned long user_addr)
+@@ -296,17 +303,51 @@
+ max_locked_pages = 32768;
+
+ ret = register_chrdev(KQEMU_MAJOR, "kqemu", &kqemu_fops);
++
+ if (ret < 0) {
+ printk("kqemu: could not get major %d\n", KQEMU_MAJOR);
+ return ret;
+ }
++
++#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,0)
++ kqemu_class = class_simple_create(THIS_MODULE, "kqemu");
++
++ if (IS_ERR(kqemu_class)) {
++ unregister_chrdev(KQEMU_MAJOR, "kqemu");
++ ret = PTR_ERR(kqemu_class);
++ goto out_chrdev;
++ }
++
++ class_simple_device_add(kqemu_class, MKDEV(KQEMU_MAJOR, 0), NULL, "kqemu");
++#endif
++
++ ret = devfs_mk_cdev(MKDEV(KQEMU_MAJOR, 0),
++ S_IFCHR|S_IRUSR|S_IWUSR, "kqemu");
++ if (ret)
++ goto out_class;
++
+ printk("KQEMU installed, max_instances=%d max_locked_mem=%dkB.\n",
+ KQEMU_MAX_INSTANCES,
+ max_locked_pages * 4);
+ return 0;
++
++out_class:
++#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,0)
++ class_simple_device_remove(MKDEV(KQEMU_MAJOR,0));
++ class_simple_destroy(kqemu_class);
++#endif
++out_chrdev:
++ unregister_chrdev(KQEMU_MAJOR, "kqemu");
++
++ return ret;
+ }
+
+ void cleanup_module(void)
+ {
+ unregister_chrdev(KQEMU_MAJOR, "kqemu");
++ devfs_remove("kqemu");
++#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,0)
++ class_simple_device_remove(MKDEV(KQEMU_MAJOR, 0));
++ class_simple_destroy(kqemu_class);
++#endif
+ }