From 5a921a188582abfeacb3d90155eb338b9035c142 Mon Sep 17 00:00:00 2001 From: waltje Date: Tue, 28 May 2019 14:55:48 -0500 Subject: [PATCH] Changes to xtide.c and statbar.c, fixes #80. --- src/devices/disk/hdc_xtide.c | 4 ++-- src/ui/ui_stbar.c | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/devices/disk/hdc_xtide.c b/src/devices/disk/hdc_xtide.c index eef5146..5930e86 100644 --- a/src/devices/disk/hdc_xtide.c +++ b/src/devices/disk/hdc_xtide.c @@ -24,7 +24,7 @@ * FIXME: Make sure this works with the new IDE stuff, the AT and PS/2 * controllers do not have dev->ide set to anything... * - * Version: @(#)hdc_xtide.c 1.0.14 2019/05/17 + * Version: @(#)hdc_xtide.c 1.0.15 2019/05/28 * * Authors: Fred N. van Kempen, * Miran Grca, @@ -172,7 +172,7 @@ xtide_init(const device_t *info, UNUSED(void *parent)) dev = (hdc_t *)mem_alloc(sizeof(hdc_t)); memset(dev, 0x00, sizeof(hdc_t)); - switch(info->local) { + switch(info->local & 0xff) { case 0: rom_sz = 0x4000; io = 0x300; diff --git a/src/ui/ui_stbar.c b/src/ui/ui_stbar.c index 6ae5d63..67d5261 100644 --- a/src/ui/ui_stbar.c +++ b/src/ui/ui_stbar.c @@ -8,7 +8,7 @@ * * Common UI support functions for the Status Bar module. * - * Version: @(#)ui_stbar.c 1.0.20 2019/05/17 + * Version: @(#)ui_stbar.c 1.0.21 2019/05/28 * * Authors: Fred N. van Kempen, * Miran Grca, @@ -503,7 +503,7 @@ ui_sb_reset(void) /* Check all (active) hard disks. */ for (drive = 0; drive < HDD_NUM; drive++) { if ((hdd[drive].bus == HDD_BUS_IDE) && - !(hdint || !strncmp(hdc, "ide", 3) || !strncmp(hdc, "xta", 3))) { + !(hdint || !strcmp(hdc, "ide") || !strcmp(hdc, "xtide") || !strcmp(hdc, "xta"))) { /* Disk, but no controller for it. */ continue; } @@ -520,7 +520,7 @@ ui_sb_reset(void) for (drive = 0; drive < CDROM_NUM; drive++) { /* Could be Internal or External IDE.. */ if ((cdrom[drive].bus_type == CDROM_BUS_ATAPI) && - !(hdint || !strncmp(hdc, "ide", 3) || !strncmp(hdc, "xta", 3))) { + !(hdint || !strcmp(hdc, "ide"))) { continue; } @@ -535,7 +535,7 @@ ui_sb_reset(void) for (drive = 0; drive < ZIP_NUM; drive++) { /* Could be Internal or External IDE.. */ if ((zip_drives[drive].bus_type == ZIP_BUS_ATAPI) && - !(hdint || !strncmp(hdc, "ide", 3) || !strncmp(hdc, "xta", 3))) { + !(hdint || !strcmp(hdc, "ide"))) { continue; } @@ -584,7 +584,7 @@ ui_sb_reset(void) for (drive = 0; drive < HDD_NUM; drive++) { if ((hdd[drive].bus == HDD_BUS_IDE) && - !(hdint || !strncmp(hdc, "ide", 3) || !strncmp(hdc, "xta", 3))) { + !(hdint || !strcmp(hdc, "ide") || !strcmp(hdc, "xtide") || !strcmp(hdc, "xta"))) { /* Disk, but no controller for it. */ continue; } @@ -604,7 +604,7 @@ ui_sb_reset(void) for (drive = 0; drive < CDROM_NUM; drive++) { /* Could be Internal or External IDE.. */ if ((cdrom[drive].bus_type == CDROM_BUS_ATAPI) && - !(hdint || !strncmp(hdc, "ide", 3))) { + !(hdint || !strcmp(hdc, "ide"))) { continue; } @@ -621,7 +621,7 @@ ui_sb_reset(void) for (drive = 0; drive < ZIP_NUM; drive++) { /* Could be Internal or External IDE.. */ if ((zip_drives[drive].bus_type == ZIP_BUS_ATAPI) && - !(hdint || !strncmp(hdc, "ide", 3))) { + !(hdint || !strcmp(hdc, "ide"))) { continue; }