diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2006-11-23 09:55:55 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2006-11-23 09:55:55 +0000 |
commit | 9e3f289f51a287863beed8688d1632a269c40db5 (patch) | |
tree | 09d7af0c7c9420489f5257dcc45439dc39c9772e /winsup/cygwin/devices.in | |
parent | 729c0e65060a1a250d0adc760a0fc5f412c5e236 (diff) | |
download | cygnal-9e3f289f51a287863beed8688d1632a269c40db5.tar.gz cygnal-9e3f289f51a287863beed8688d1632a269c40db5.tar.bz2 cygnal-9e3f289f51a287863beed8688d1632a269c40db5.zip |
* devices.h: Add additional SCSI disk block device numbers per
http://www.kernel.org/pub/linux/docs/device-list/devices.txt
up to 128 devices.
* devices.in: Ditto.
(device::parsedisk): Add additonal else-if cases for decoding base
and drive indices.
* devices.cc: Regenerate.
* dtable.cc (build_fh_pc): Add additional DEV_SD{2..7}_MAJOR cases.
Diffstat (limited to 'winsup/cygwin/devices.in')
-rw-r--r-- | winsup/cygwin/devices.in | 44 |
1 files changed, 42 insertions, 2 deletions
diff --git a/winsup/cygwin/devices.in b/winsup/cygwin/devices.in index 43d097298..87c64f2af 100644 --- a/winsup/cygwin/devices.in +++ b/winsup/cygwin/devices.in @@ -85,7 +85,15 @@ const device dev_bad_storage = "/dev/scd%(0-15)d", BRACK(FHDEV(DEV_CDROM_MAJOR, {$1})), "\\Device\\CdRom{$1}" "/dev/sr%(0-15)d", BRACK(FHDEV(DEV_CDROM_MAJOR, {$1})), "\\Device\\CdRom{$1}" "/dev/sd%{a-z}s", BRACK(FH_SD{uc $1}), "\\Device\\Harddisk{ord($1) - ord('a')}\\Partition0" +"/dev/sda%{a-z}s", BRACK(FH_SDA{uc $1}), "\\Device\\Harddisk{26 + ord($1) - ord('a')}\\Partition0" +"/dev/sdb%{a-z}s", BRACK(FH_SDB{uc $1}), "\\Device\\Harddisk{52 + ord($1) - ord('a')}\\Partition0" +"/dev/sdc%{a-z}s", BRACK(FH_SDC{uc $1}), "\\Device\\Harddisk{78 + ord($1) - ord('a')}\\Partition0" +"/dev/sdd%{a-x}s", BRACK(FH_SDD{uc $1}), "\\Device\\Harddisk{104 + ord($1) - ord('a')}\\Partition0" "/dev/sd%{a-z}s%(1-15)d", BRACK(FH_SD{uc $1} | {$2}), "\\Device\\Harddisk{ord($1) - ord('a')}\\Partition{$2 % 16}" +"/dev/sda%{a-z}s%(1-15)d", BRACK(FH_SDA{uc $1} | {$2}), "\\Device\\Harddisk{26 + ord($1) - ord('a')}\\Partition{$2 % 16}" +"/dev/sdb%{a-z}s%(1-15)d", BRACK(FH_SDB{uc $1} | {$2}), "\\Device\\Harddisk{52 + ord($1) - ord('a')}\\Partition{$2 % 16}" +"/dev/sdc%{a-z}s%(1-15)d", BRACK(FH_SDC{uc $1} | {$2}), "\\Device\\Harddisk{78 + ord($1) - ord('a')}\\Partition{$2 % 16}" +"/dev/sdd%{a-x}s%(1-15)d", BRACK(FH_SDD{uc $1} | {$2}), "\\Device\\Harddisk{104 + ord($1) - ord('a')}\\Partition{$2 % 16}" "/dev/kmsg", BRACK(FH_KMSG), "\\\\.\\mailslot\\cygwin\\dev\\kmsg" "/dev", BRACK(FH_DEV), "/dev" %other {return NULL;} @@ -146,12 +154,44 @@ void device::parsedisk (int drive, int part) { int base; - if (drive < ('q' - 'a')) + if (drive < ('q' - 'a')) /* /dev/sda -to- /dev/sdp */ base = DEV_SD_MAJOR; - else + else if (drive < 32) /* /dev/sdq -to- /dev/sdaf */ { base = DEV_SD1_MAJOR; drive -= 'q' - 'a'; } + else if (drive < 48) /* /dev/sdag -to- /dev/sdav */ + { + base = DEV_SD2_MAJOR; + drive -= 32; + } + else if (drive < 64) /* /dev/sdaw -to- /dev/sdbl */ + { + base = DEV_SD3_MAJOR; + drive -= 48; + } + else if (drive < 80) /* /dev/sdbm -to- /dev/sdcb */ + { + base = DEV_SD4_MAJOR; + drive -= 64; + } + else if (drive < 96) /* /dev/sdcc -to- /dev/sdcr */ + { + base = DEV_SD5_MAJOR; + drive -= 80; + } + else if (drive < 112) /* /dev/sdcs -to- /dev/sddh */ + { + base = DEV_SD6_MAJOR; + drive -= 96; + } + /* NOTE: This will cause multiple /dev/sddx entries in + /proc/partitions if there are more than 128 devices */ + else /* /dev/sddi -to- /dev/sddx */ + { + base = DEV_SD7_MAJOR; + drive -= 112; + } parse (base, part + (drive * 16)); } |