From 3f96a9cd499dec5c901b451056f1070cc7c77a4a Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Wed, 1 Sep 2004 03:56:22 +0000 Subject: [PATCH] Tweak. --- src/devices/disk.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/devices/disk.c b/src/devices/disk.c index 1a50969..2381c57 100644 --- a/src/devices/disk.c +++ b/src/devices/disk.c @@ -46,7 +46,7 @@ /* An ATA device. */ struct disk { - char name[8]; /* e.g. "hd0:1". */ + char name[8]; /* Name, e.g. "hd0:1". */ struct channel *channel; /* Channel disk is on. */ int dev_no; /* Device 0 or 1 for master or slave. */ @@ -58,8 +58,8 @@ struct disk Each channel can control up to two disks. */ struct channel { - char name[8]; /* e.g. "hd0" */ - uint16_t reg_base; /* 0x1f0 for hd0, 0x170 for hd1. */ + char name[8]; /* Name, e.g. "hd0". */ + uint16_t reg_base; /* Base I/O port. */ uint8_t irq; /* Interrupt in use. */ struct lock lock; /* Must acquire to access the controller. */ @@ -71,8 +71,8 @@ struct channel }; /* We support the two "legacy" ATA channels found in a standard PC. */ -#define CHANNEL_CNT (sizeof channels / sizeof *channels) -static struct channel channels[2]; +#define CHANNEL_CNT 2 +static struct channel channels[CHANNEL_CNT]; static void reset_channel (struct channel *); static bool check_device_type (struct disk *); -- 2.30.2