qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [5225] Define a few structures instead of including a file,


From: Blue Swirl
Subject: [Qemu-devel] [5225] Define a few structures instead of including a file, add "static"
Date: Mon, 15 Sep 2008 14:57:12 +0000

Revision: 5225
          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5225
Author:   blueswir1
Date:     2008-09-15 14:57:11 +0000 (Mon, 15 Sep 2008)

Log Message:
-----------
Define a few structures instead of including a file, add "static"

Modified Paths:
--------------
    trunk/usb-linux.c

Modified: trunk/usb-linux.c
===================================================================
--- trunk/usb-linux.c   2008-09-15 08:49:15 UTC (rev 5224)
+++ trunk/usb-linux.c   2008-09-15 14:57:11 UTC (rev 5225)
@@ -35,11 +35,29 @@
 #include <sys/ioctl.h>
 #include <signal.h>
 
-#include <linux/usb/ch9.h>
 #include <linux/usbdevice_fs.h>
 #include <linux/version.h>
 #include "hw/usb.h"
 
+/* We redefine it to avoid version problems */
+struct usb_ctrltransfer {
+    uint8_t  bRequestType;
+    uint8_t  bRequest;
+    uint16_t wValue;
+    uint16_t wIndex;
+    uint16_t wLength;
+    uint32_t timeout;
+    void *data;
+};
+
+struct usb_ctrlrequest {
+    uint8_t bRequestType;
+    uint8_t bRequest;
+    uint16_t wValue;
+    uint16_t wIndex;
+    uint16_t wLength;
+};
+
 typedef int USBScanFunc(void *opaque, int bus_num, int addr, int class_id,
                         int vendor_id, int product_id,
                         const char *product_name, int speed);
@@ -710,7 +728,7 @@
  *
  * Returns length of the transaction or one of the USB_RET_XXX codes.
  */
-int usb_host_handle_packet(USBDevice *s, USBPacket *p)
+static int usb_host_handle_packet(USBDevice *s, USBPacket *p)
 {
     switch(p->pid) {
     case USB_MSG_ATTACH:






reply via email to

[Prev in Thread] Current Thread [Next in Thread]