diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/disk.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -304,6 +304,7 @@ int disk_init(struct usb_device_info * dev) { int maj2; int min1; int min2; + int tmp; maj1 = -1; maj2 = -1; @@ -390,6 +391,16 @@ int disk_init(struct usb_device_info * dev) { return -1; } + /* Ensure that maj1:min1 is first device and maj2:min2 is second device */ + if ( min2 < min1 ) { + tmp = min1; + min1 = min2; + min2 = tmp; + tmp = maj1; + maj1 = maj2; + maj2 = tmp; + } + /* TODO: change 1 to 0 when disk_flash_dev will be implemented */ /* RX-51 and RM-680 export MyDocs in first usb device and just first partion, so host system see whole device without MBR table */ |