disk: Ensure that maj1:min1 is first device and maj2:min2 is second device
This commit is contained in:
1 parent
10b495120e
commit
e685787e67
1 file changed
+11
+11
@@ -304,6 +304,7 @@ int disk_init(struct usb_device_info * dev) {
|
|||||||
int maj2;
|
int maj2;
|
||||||
int min1;
|
int min1;
|
||||||
int min2;
|
int min2;
|
||||||
|
int tmp;
|
||||||
|
|
||||||
maj1 = -1;
|
maj1 = -1;
|
||||||
maj2 = -1;
|
maj2 = -1;
|
||||||
@@ -390,6 +391,16 @@ int disk_init(struct usb_device_info * dev) {
|
|||||||
return -1;
|
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 */
|
/* 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 */
|
/* RX-51 and RM-680 export MyDocs in first usb device and just first partion, so host system see whole device without MBR table */
|
||||||
|
|||||||
Reference in new issue
Block a user