summaryrefslogtreecommitdiff
path: root/Kernel/Patches/Let2BlkDevTypeFDC.HC
blob: 3a2afc35cfdd1b71ce0e6ef83f5275538fe10845 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// PATCH: Remaps ltrs W-Z for floppy drives
// FILE: ::/Kernel/BlkDev/DskDrv.HC
// TO INSTALL: Comment out the original function, then #include this file.

I64 Let2BlkDevType(U8 drv_let)
{//Drv letter to BlkDev Type. drv_let=0 not allowed. See BDT_NULL.
  drv_let=Let2Let(drv_let);
  if ('A'<=drv_let<='B')
    return BDT_RAM;
  if ('C'<=drv_let<='L')
    return BDT_ATA;
  if ('M'<=drv_let<='P')
    return BDT_ISO_FILE_READ;
  if ('Q'<=drv_let<='S')
    return BDT_ISO_FILE_WRITE;
  if ('T'<=drv_let<='V')
    return BDT_ATAPI;
  if ('W'<=drv_let<='Z')
    return BDT_FLOPPY;
  return BDT_NULL;
}