]> xenbits.xensource.com Git - xenclient/ioemu-pq.git/commitdiff
Revert " - Fix some compilation errors in the last commit."
authorJean Guyader <jean.guyader@eu.citrix.com>
Mon, 27 Jul 2009 11:21:45 +0000 (12:21 +0100)
committerJean Guyader <jean.guyader@eu.citrix.com>
Mon, 27 Jul 2009 11:21:45 +0000 (12:21 +0100)
This reverts commit 4959436fe013520982398de3d2eafcc28df2ec13.

master/dom0-driver
master/intel

index 37eb5085b8e246c08367ca647f380ee55c72a3f2..a222e5d2be869938535770416587773077f8d5c9 100644 (file)
@@ -24,10 +24,10 @@ index 14b42f3..97214c0 100644
  #endif
 diff --git a/dom0_driver.c b/dom0_driver.c
 new file mode 100644
-index 0000000..a747911
+index 0000000..bdfe37c
 --- /dev/null
 +++ b/dom0_driver.c
-@@ -0,0 +1,712 @@
+@@ -0,0 +1,718 @@
 +/*
 + * QEMU dom0_driver
 + *
@@ -73,6 +73,7 @@ index 0000000..a747911
 +#include <time.h>
 +
 +extern int vga_passthrough;
++extern int intel;
 +
 +static void dom0_driver_state_change(const char *path, void *opaque);
 +static void dom0_driver_command(const char *path, void *opaque);
@@ -727,6 +728,11 @@ index 0000000..a747911
 +      driver.enter = dom0_driver_unblank;
 +      driver.leave = dom0_driver_blank;
 +    }
++    else if (intel)
++    {
++        driver.enter = intel_enter;
++        driver.leave = intel_leave;
++    }
 +    else
 +    {
 +      driver.enter = dom0_driver_dummy_enter_leave;
@@ -742,10 +748,10 @@ index 0000000..a747911
 +}
 diff --git a/hid-linux.c b/hid-linux.c
 new file mode 100644
-index 0000000..9e09f97
+index 0000000..73bb956
 --- /dev/null
 +++ b/hid-linux.c
-@@ -0,0 +1,557 @@
+@@ -0,0 +1,555 @@
 +/*
 + * QEMU hid-linux /dev/input driver
 + *
@@ -839,8 +845,6 @@ index 0000000..9e09f97
 +    KEY_V, KEY_W, KEY_X, KEY_Y, KEY_Z
 +};
 +
-+static void hid_linux_secure_read(void *opaque);
-+
 +static char keycode2ascii(int keycode)
 +{
 +    int i = 0;
@@ -888,7 +892,7 @@ index 0000000..9e09f97
 +    char *ret;
 +
 +    if (asprintf(&path, HID_LINUX_XS_PATH"/%s", key) == -1)
-+      return;
++      return NULL;
 +    ret = xenstore_read(path);
 +    free(path);
 +
@@ -983,7 +987,7 @@ index 0000000..9e09f97
 + * the mouse, but not the keyboard (the appserver has the keyboard),
 + * you want to be able to do Alt+Tab inside the PVM even if you
 + * don't have the keyboard. */
-+static bool hid_linux_check_modifiers_pt(uint32_t keycode)
++static bool hid_linux_check_modifiers_pt(void)
 +{
 +    /* We don't passthrough if we don't have the mouse */
 +    if (!hid_linux_driver.has_mouse)
@@ -1003,23 +1007,23 @@ index 0000000..9e09f97
 +          return;
 +
 +    if (hid_linux_driver.has_keyboard || // We have the keyboard
-+        hid_linux_check_modifiers_pt(keycode))
++        hid_linux_check_modifiers_pt())
 +        hid_linux_key_inject(code, keycode);
 +}
 +
 +static void hid_linux_keyboard_read(void *opaque)
 +{
-+    struct input_event  event[5];
-+    int                 i = 0;
-+    int                 read_sz = 0;
-+    int                 fd = *(int *)opaque;
-+
 +    if (hid_linux_driver.secure_key && hid_linux_driver.has_keyboard)
 +    {
-+        hid_linux_secure_read(opaque);
++        hid_linux_driver.secure_key(opaque);
 +        return;
 +    }
 +
++    struct input_event  event[5];
++    int                 i = 0;
++    int                 read_sz = 0;
++    int                 fd = *(int *)opaque;
++
 +    read_sz = read(fd, event, sizeof (event));
 +    if (read_sz <= 0)
 +        return;
@@ -1066,13 +1070,13 @@ index 0000000..9e09f97
 +    else if (event->type == EV_ABS)
 +    {
 +        static int last_x = 1, last_y = 1;
-+        int px = 0, py = 0, l = 50, d = 1;
++        int px = 0, py = 0, l = 50;
 +        double div = 1;
 +        char *str = NULL;
 +
 +        hid_linux_xs_read_int("touchpad-limit", &l);
-+        hid_linux_xs_read_int("touchpad-div", &d);
-+        div = d / 1000.;
++        hid_linux_xs_read_int("touchpad-div", &div);
++        div /= 1000.;
 +
 +        switch (event->code)
 +        {
index 784d9e8337b73f3f315cb66e5a38dad79bda59cc..2b74a3a3aa109090b9c59d787d62b56ff845a7c0 100644 (file)
@@ -32,30 +32,6 @@ index 97214c0..8c9b09b 100644
 +int intel_leave(void);
 +void intel_display_init(DisplayState *ds);
  #endif
-diff --git a/dom0_driver.c b/dom0_driver.c
-index a747911..bdfe37c 100644
---- a/dom0_driver.c
-+++ b/dom0_driver.c
-@@ -43,6 +43,7 @@
- #include <time.h>
- extern int vga_passthrough;
-+extern int intel;
- static void dom0_driver_state_change(const char *path, void *opaque);
- static void dom0_driver_command(const char *path, void *opaque);
-@@ -697,6 +698,11 @@ void dom0_driver_init(const char *position)
-       driver.enter = dom0_driver_unblank;
-       driver.leave = dom0_driver_blank;
-     }
-+    else if (intel)
-+    {
-+        driver.enter = intel_enter;
-+        driver.leave = intel_leave;
-+    }
-     else
-     {
-       driver.enter = dom0_driver_dummy_enter_leave;
 diff --git a/hw/vga.c b/hw/vga.c
 index 90bd544..a2b8744 100644
 --- a/hw/vga.c
@@ -668,7 +644,7 @@ index 0000000..eb0b9c0
 +    lds = ds;
 +}
 diff --git a/vl.c b/vl.c
-index 45e03c1..fdab62f 100644
+index 0ffe1ec..97cb5d8 100644
 --- a/vl.c
 +++ b/vl.c
 @@ -235,6 +235,7 @@ int win2k_install_hack = 0;
@@ -679,7 +655,7 @@ index 45e03c1..fdab62f 100644
  #endif
  int usb_enabled = 0;
  int smp_cpus = 1;
-@@ -4305,6 +4306,7 @@ enum {
+@@ -4293,6 +4294,7 @@ enum {
      QEMU_OPTION_vcpus,
      QEMU_OPTION_vga_passthrough,
      QEMU_OPTION_dom0_input,
@@ -687,7 +663,7 @@ index 45e03c1..fdab62f 100644
  
      /* Debug/Expert options: */
      QEMU_OPTION_serial,
-@@ -4480,6 +4482,7 @@ static const QEMUOption qemu_options[] = {
+@@ -4468,6 +4470,7 @@ static const QEMUOption qemu_options[] = {
      { "vcpus", HAS_ARG, QEMU_OPTION_vcpus },
      { "vga-passthrough", 0, QEMU_OPTION_vga_passthrough },
      { "dom0-input", 1, QEMU_OPTION_dom0_input },
@@ -695,7 +671,7 @@ index 45e03c1..fdab62f 100644
  #if defined(CONFIG_XEN) && !defined(CONFIG_DM)
      { "xen-domid", HAS_ARG, QEMU_OPTION_xen_domid },
      { "xen-create", 0, QEMU_OPTION_xen_create },
-@@ -5319,6 +5322,9 @@ int main(int argc, char **argv, char **envp)
+@@ -5307,6 +5310,9 @@ int main(int argc, char **argv, char **envp)
              case QEMU_OPTION_dom0_input:
                  dom0_input = optarg;
                  break;
@@ -705,7 +681,7 @@ index 45e03c1..fdab62f 100644
              case QEMU_OPTION_direct_pci:
                 direct_pci = optarg;
                  break;
-@@ -5921,26 +5927,26 @@ int main(int argc, char **argv, char **envp)
+@@ -5909,26 +5915,26 @@ int main(int argc, char **argv, char **envp)
                  curses_display_init(ds, full_screen);
              } else
  #endif