freemyipod r234 - Code Review

Jump to: navigation, search
Repository:freemyipod
Revision:r233‎ | r234 | r235 >
Date:17:13, 30 October 2010
Author:theseven
Status:new
Tags:
Comment:
emBIOS: Fix USB string descriptor handling, get rid of "invalid string descriptor 0, using default 0x0409" error on linux
Modified paths:
  • /embios/trunk/usb/usb.c (modified) (history)

Diff [purge]

Index: embios/trunk/usb/usb.c
@@ -276,16 +276,17 @@
277277 {
278278 case 0:
279279 addr = &lang_descriptor;
280 - size = sizeof(lang_descriptor);
 280+ size = lang_descriptor.bLength;
281281 break;
282282 case 1:
283283 string_devicename.bLength = 14;
284284 addr = &string_devicename;
285 - size = 14;
 285+ size = string_devicename.bLength;
 286+ break;
286287 case 2:
287288 string_devicename.bLength = sizeof(string_devicename);
288289 addr = &string_devicename;
289 - size = sizeof(string_devicename);
 290+ size = string_devicename.bLength;
290291 break;
291292 }
292293 break;