diff --git a/elks/arch/i86/drivers/block/bios.c b/elks/arch/i86/drivers/block/bios.c index 24e1b8998..637369975 100644 --- a/elks/arch/i86/drivers/block/bios.c +++ b/elks/arch/i86/drivers/block/bios.c @@ -17,8 +17,8 @@ #define RESET_DISK_CHG 0 /* =1 to reset BIOS on drive change fixes QEMU retry */ /* FIXME semi-copied from bioshd.c */ -#define MINOR_SHIFT 5 /* =log2(NUM_MINOR) shift to get drive num*/ -#define MAX_DRIVES 8 /* =256/NUM_MINOR*/ +#define MINOR_SHIFT 3 /* =log2(NUM_MINOR) shift to get drive num*/ +#define MAX_DRIVES 8 /* <=256/NUM_MINOR*/ #define DRIVE_FD0 4 /* =MAX_DRIVES/2 first floppy drive*/ struct drive_infot fd_types[] = { /* AT/PS2 BIOS reported floppy formats*/ diff --git a/elks/arch/i86/drivers/block/bioshd.c b/elks/arch/i86/drivers/block/bioshd.c index 9ed3e90f9..532f6dcd9 100644 --- a/elks/arch/i86/drivers/block/bioshd.c +++ b/elks/arch/i86/drivers/block/bioshd.c @@ -62,9 +62,9 @@ #define MAX_ERRS 5 /* maximum sector read/write error retries */ /* the following must match with /dev minor numbering scheme*/ -#define NUM_MINOR 32 /* max minor devices per drive*/ -#define MINOR_SHIFT 5 /* =log2(NUM_MINOR) shift to get drive num*/ -#define MAX_DRIVES 8 /* =256/NUM_MINOR*/ +#define NUM_MINOR 8 /* max minor devices per drive*/ +#define MINOR_SHIFT 3 /* =log2(NUM_MINOR) shift to get drive num*/ +#define MAX_DRIVES 8 /* <=256/NUM_MINOR*/ #define DRIVE_HD0 0 #define DRIVE_FD0 4 /* =MAX_DRIVES/2 first floppy drive*/ diff --git a/elks/include/linuxmt/devnum.h b/elks/include/linuxmt/devnum.h index e4fa07f04..51c1ffc8a 100644 --- a/elks/include/linuxmt/devnum.h +++ b/elks/include/linuxmt/devnum.h @@ -12,13 +12,13 @@ /* block devices */ #define DEV_HDA MKDEV(BIOSHD_MAJOR, 0) -#define DEV_HDB MKDEV(BIOSHD_MAJOR, 32) -#define DEV_HDC MKDEV(BIOSHD_MAJOR, 64) -#define DEV_HDD MKDEV(BIOSHD_MAJOR, 96) -#define DEV_FD0 MKDEV(BIOSHD_MAJOR, 128) -#define DEV_FD1 MKDEV(BIOSHD_MAJOR, 160) -#define DEV_FD2 MKDEV(BIOSHD_MAJOR, 192) -#define DEV_FD3 MKDEV(BIOSHD_MAJOR, 224) +#define DEV_HDB MKDEV(BIOSHD_MAJOR, 8) +#define DEV_HDC MKDEV(BIOSHD_MAJOR, 16) +#define DEV_HDD MKDEV(BIOSHD_MAJOR, 24) +#define DEV_FD0 MKDEV(BIOSHD_MAJOR, 32) +#define DEV_FD1 MKDEV(BIOSHD_MAJOR, 40) +#define DEV_FD2 MKDEV(BIOSHD_MAJOR, 48) +#define DEV_FD3 MKDEV(BIOSHD_MAJOR, 56) #define DEV_ROM MKDEV(ROMFLASH_MAJOR, 0) /* char devices */ diff --git a/image/Make.devices b/image/Make.devices index 37321c5dd..c2c50e4a1 100755 --- a/image/Make.devices +++ b/image/Make.devices @@ -38,7 +38,7 @@ devices: ############################################################################## # BIOS devices, hard and floppy disks. -# Limit to 4 primary partitions per disk (MBR). +# Limit to 4 primary partitions and 3 extended per disk (MBR). $(MKDEV) /dev/hda b 3 0 $(MKDEV) /dev/hda1 b 3 1 @@ -48,17 +48,16 @@ devices: $(MKDEV) /dev/hda5 b 3 5 $(MKDEV) /dev/hda6 b 3 6 $(MKDEV) /dev/hda7 b 3 7 - $(MKDEV) /dev/hda8 b 3 8 - $(MKDEV) /dev/hdb b 3 32 - $(MKDEV) /dev/hdb1 b 3 33 - $(MKDEV) /dev/hdb2 b 3 34 - $(MKDEV) /dev/hdb3 b 3 35 - $(MKDEV) /dev/hdb4 b 3 36 - $(MKDEV) /dev/hdc b 3 64 - $(MKDEV) /dev/hdc1 b 3 65 - $(MKDEV) /dev/hdd b 3 96 - $(MKDEV) /dev/fd0 b 3 128 - $(MKDEV) /dev/fd1 b 3 160 + $(MKDEV) /dev/hdb b 3 8 + $(MKDEV) /dev/hdb1 b 3 9 + $(MKDEV) /dev/hdb2 b 3 10 + $(MKDEV) /dev/hdb3 b 3 11 + $(MKDEV) /dev/hdb4 b 3 12 + $(MKDEV) /dev/hdc b 3 16 + $(MKDEV) /dev/hdc1 b 3 17 + $(MKDEV) /dev/hdd b 3 24 + $(MKDEV) /dev/fd0 b 3 32 + $(MKDEV) /dev/fd1 b 3 40 ############################################################################## # Pseudo-TTY master devices.