Skip to content

Commit

Permalink
Merge pull request #1777 from tyama501/bioshd_fix
Browse files Browse the repository at this point in the history
[bioshd] fix fd_types
  • Loading branch information
ghaerr authored Dec 24, 2023
2 parents 0cf9d6a + c8ba182 commit 2940102
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions elks/arch/i86/drivers/block/bios.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ struct drive_infot fd_types[] = { /* AT/PS2 BIOS reported floppy formats*/
{80, 15, 2, 512, 1}, /* 1.2M */
{80, 9, 2, 512, 2}, /* 720k */
{80, 18, 2, 512, 3}, /* 1.4M */
{80, 36, 2, 512, 4}, /* 2.88M */
{80, 36, 2, 512, 5}, /* 2.88M */
{80, 36, 2, 512, 6}, /* 2.88M */
{77, 8, 2, 1024,7}, /* 1.232M PC/98 only */
{77, 8, 2, 1024,6}, /* 1.232M PC/98 only */
};

/* BIOS drive mappings */
Expand Down
3 changes: 1 addition & 2 deletions elks/arch/i86/drivers/block/bioshd.c
Original file line number Diff line number Diff line change
Expand Up @@ -195,11 +195,10 @@ static void probe_floppy(int target, struct hd_struct *hdp)
unsigned char media = boot[21]; /* bpb_media_byte */
drivep->cylinders =
(media == 0xFD)? 40:
#ifdef CONFIG_IMG_FD1232
#ifdef CONFIG_ARCH_PC98
(media == 0xFE)? 77: /* FD1232 is 77 tracks */
#endif
80;
drivep->cylinders = (media == 0xFD)? 40: 80;
found_PB = 2;
#if DEBUG_PROBE
printk("fd: found valid FAT CHS %d,%d,%d disk parameters on /dev/fd%d "
Expand Down

0 comments on commit 2940102

Please sign in to comment.