From b1d2840445c6b471e600f7d6177b6fc56bffc666 Mon Sep 17 00:00:00 2001 From: Vladimir 'phcoder' Serbinenko Date: Wed, 23 Mar 2011 12:21:15 +0100 Subject: [PATCH] * grub-core/disk/usbms.c (grub_usbms_reset): Transform USB-style error into GRUB-style one. --- ChangeLog | 5 +++++ grub-core/disk/usbms.c | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 87f78e0bd..20a83dd84 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2011-03-23 Vladimir Serbinenko + + * grub-core/disk/usbms.c (grub_usbms_reset): Transform USB-style error + into GRUB-style one. + 2011-03-23 Vladimir Serbinenko * grub-core/bus/usb/usbtrans.c (grub_usb_control_msg): Return usb-style diff --git a/grub-core/disk/usbms.c b/grub-core/disk/usbms.c index 2e5d2459a..fcfe9e5d4 100644 --- a/grub-core/disk/usbms.c +++ b/grub-core/disk/usbms.c @@ -70,7 +70,11 @@ static int first_available_slot = 0; static grub_err_t grub_usbms_reset (grub_usb_device_t dev, int interface) { - return grub_usb_control_msg (dev, 0x21, 255, 0, interface, 0, 0); + grub_usb_err_t u; + u = grub_usb_control_msg (dev, 0x21, 255, 0, interface, 0, 0); + if (u) + return grub_error (GRUB_ERR_IO, "USB error %d", u); + return GRUB_ERR_NONE; } static void