Lines 419-424
Link Here
|
419 |
{ |
419 |
{ |
420 |
sprintf (name, "/dev/rd/c%dd%d", controller, drive); |
420 |
sprintf (name, "/dev/rd/c%dd%d", controller, drive); |
421 |
} |
421 |
} |
|
|
422 |
|
423 |
static void |
424 |
get_i2o_disk_name (char *name, int unit) |
425 |
{ |
426 |
sprintf (name, "/dev/i2o/hd%c", unit + 'a'); |
427 |
} |
422 |
#endif |
428 |
#endif |
423 |
|
429 |
|
424 |
/* Check if DEVICE can be read. If an error occurs, return zero, |
430 |
/* Check if DEVICE can be read. If an error occurs, return zero, |
Lines 789-794
Link Here
|
789 |
} |
795 |
} |
790 |
} |
796 |
} |
791 |
} |
797 |
} |
|
|
798 |
|
799 |
/* I2O disks. */ |
800 |
for (i = 0; i < 8; i++) |
801 |
{ |
802 |
char name[16]; |
803 |
|
804 |
get_i2o_disk_name (name, i); |
805 |
if (check_device (name)) |
806 |
{ |
807 |
(*map)[num_hd + 0x80] = strdup (name); |
808 |
assert ((*map)[num_hd + 0x80]); |
809 |
|
810 |
/* If the device map file is opened, write the map. */ |
811 |
if (fp) |
812 |
fprintf (fp, "(hd%d)\t%s\n", num_hd, name); |
813 |
|
814 |
num_hd++; |
815 |
} |
816 |
} |
817 |
|
792 |
#endif /* __linux__ */ |
818 |
#endif /* __linux__ */ |
793 |
|
819 |
|
794 |
/* OK, close the device map file if opened. */ |
820 |
/* OK, close the device map file if opened. */ |
Lines 844-850
Link Here
|
844 |
(strncmp(dev, "/dev/ida/", 9) == 0 || |
870 |
(strncmp(dev, "/dev/ida/", 9) == 0 || |
845 |
strncmp(dev, "/dev/ataraid/", 13) == 0 || |
871 |
strncmp(dev, "/dev/ataraid/", 13) == 0 || |
846 |
strncmp(dev, "/dev/cciss/", 11) == 0 || |
872 |
strncmp(dev, "/dev/cciss/", 11) == 0 || |
847 |
strncmp(dev, "/dev/rd/", 8) == 0) ? "p" : "", |
873 |
strncmp(dev, "/dev/rd/", 8) == 0 || |
|
|
874 |
strncmp(dev, "/dev/i2o/", 9) == 0) ? "p" : "", |
848 |
((partition >> 16) & 0xFF) + 1); |
875 |
((partition >> 16) & 0xFF) + 1); |
849 |
|
876 |
|
850 |
/* Open the partition. */ |
877 |
/* Open the partition. */ |