Commit 0d380648582e081ffb873b29717cf6611a517daf
1 parent
24772c1e
husb: Fixup printfs and stuff based on the review comments (Max Krasnyansky)
Addressing Anthony's comments regarding printf and stuff. Anthony, if you you want I can fold this commit and resend the original patch. Signed-off-by: Max Krasnyansky <maxk@kernel.org> Signed-off-by: AnthonY Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5053 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
4 additions
and
7 deletions
usb-linux.c
| @@ -272,7 +272,7 @@ static int usb_host_update_interfaces(USBHostDevice *dev, int configuration) | @@ -272,7 +272,7 @@ static int usb_host_update_interfaces(USBHostDevice *dev, int configuration) | ||
| 272 | } | 272 | } |
| 273 | 273 | ||
| 274 | if (i >= dev->descr_len) { | 274 | if (i >= dev->descr_len) { |
| 275 | - printf("husb: update iface failed. no matching configuration\n"); | 275 | + fprintf(stderr, "husb: update iface failed. no matching configuration\n"); |
| 276 | goto fail; | 276 | goto fail; |
| 277 | } | 277 | } |
| 278 | nb_interfaces = dev->descr[i + 4]; | 278 | nb_interfaces = dev->descr[i + 4]; |
| @@ -815,9 +815,6 @@ static int usb_host_auto_scan(void *opaque, int bus_num, int addr, | @@ -815,9 +815,6 @@ static int usb_host_auto_scan(void *opaque, int bus_num, int addr, | ||
| 815 | return 0; | 815 | return 0; |
| 816 | 816 | ||
| 817 | for (f = usb_auto_filter; f; f = f->next) { | 817 | for (f = usb_auto_filter; f; f = f->next) { |
| 818 | - // printf("Auto match: bus_num %d addr %d vid %d pid %d\n", | ||
| 819 | - // bus_num, addr, vendor_id, product_id); | ||
| 820 | - | ||
| 821 | if (f->bus_num >= 0 && f->bus_num != bus_num) | 818 | if (f->bus_num >= 0 && f->bus_num != bus_num) |
| 822 | continue; | 819 | continue; |
| 823 | 820 | ||
| @@ -860,8 +857,8 @@ static void usb_host_auto_add(int bus_num, int addr, int vendor_id, int product_ | @@ -860,8 +857,8 @@ static void usb_host_auto_add(int bus_num, int addr, int vendor_id, int product_ | ||
| 860 | { | 857 | { |
| 861 | struct USBAutoFilter *f = qemu_mallocz(sizeof(*f)); | 858 | struct USBAutoFilter *f = qemu_mallocz(sizeof(*f)); |
| 862 | if (!f) { | 859 | if (!f) { |
| 863 | - printf("husb: failed to allocate auto filter\n"); | ||
| 864 | - return; | 860 | + fprintf(stderr, "husb: failed to allocate auto filter\n"); |
| 861 | + return; | ||
| 865 | } | 862 | } |
| 866 | 863 | ||
| 867 | f->bus_num = bus_num; | 864 | f->bus_num = bus_num; |
| @@ -878,7 +875,7 @@ static void usb_host_auto_add(int bus_num, int addr, int vendor_id, int product_ | @@ -878,7 +875,7 @@ static void usb_host_auto_add(int bus_num, int addr, int vendor_id, int product_ | ||
| 878 | */ | 875 | */ |
| 879 | usb_auto_timer = qemu_new_timer(rt_clock, usb_host_auto_timer, NULL); | 876 | usb_auto_timer = qemu_new_timer(rt_clock, usb_host_auto_timer, NULL); |
| 880 | if (!usb_auto_timer) { | 877 | if (!usb_auto_timer) { |
| 881 | - printf("husb: failed to allocate timer\n"); | 878 | + fprintf(stderr, "husb: failed to allocate auto scan timer\n"); |
| 882 | qemu_free(f); | 879 | qemu_free(f); |
| 883 | return; | 880 | return; |
| 884 | } | 881 | } |