qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH] fill in fd information in usb device


From: Glauber Costa
Subject: [Qemu-devel] [PATCH] fill in fd information in usb device
Date: Thu, 17 Sep 2009 18:40:21 -0400

We currently open the usb device and store the file descriptor at
fd. But we don't touch the dev structure. Further on,
usb_host_claim_interfaces() issues ioctls on dev->fd, which will obviously
fail

This line used to be there in the past, but was probably removed by accident
somewhere back in history.

Signed-off-by: Glauber Costa <address@hidden>
---
 usb-linux.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/usb-linux.c b/usb-linux.c
index c434e4f..01d891c 100644
--- a/usb-linux.c
+++ b/usb-linux.c
@@ -922,6 +922,7 @@ static USBDevice *usb_host_device_open_addr(int bus_num, 
int addr, const char *p
 
     dev->bus_num = bus_num;
     dev->addr = addr;
+    dev->fd = fd;
 
     /* read the device description */
     dev->descr_len = read(fd, dev->descr, sizeof(dev->descr));
-- 
1.6.2.2





reply via email to

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