From e59142714c821dd48e2bd98f443f2bc93cfae1f8 Mon Sep 17 00:00:00 2001 From: Søren Schmidt Date: Thu, 7 Oct 2004 11:43:25 +0000 Subject: Add SHARP to the pool of drives that doesn not need byteswapping of the model etc fields from identify. --- sys/dev/ata/ata-all.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'sys/dev') diff --git a/sys/dev/ata/ata-all.c b/sys/dev/ata/ata-all.c index 6bc631dd7c8de..982fdae3cee1f 100644 --- a/sys/dev/ata/ata-all.c +++ b/sys/dev/ata/ata-all.c @@ -680,16 +680,18 @@ ata_getparam(struct ata_device *atadev, u_int8_t command) *ptr = bswap16(*ptr); } #endif - if (!((atacap->model[0] == 'N' && atacap->model[1] == 'E') || - (atacap->model[0] == 'F' && atacap->model[1] == 'X') || - (atacap->model[0] == 'P' && atacap->model[1] == 'i'))) + if (!(!strncmp(atacap->model, "FX", 2) || + !strncmp(atacap->model, "NEC", 3) || + !strncmp(atacap->model, "Pioneer", 7) || + !strncmp(atacap->model, "SHARP", 5))) { bswap(atacap->model, sizeof(atacap->model)); + bswap(atacap->revision, sizeof(atacap->revision)); + bswap(atacap->serial, sizeof(atacap->serial)); + } btrim(atacap->model, sizeof(atacap->model)); bpack(atacap->model, atacap->model, sizeof(atacap->model)); - bswap(atacap->revision, sizeof(atacap->revision)); btrim(atacap->revision, sizeof(atacap->revision)); bpack(atacap->revision, atacap->revision, sizeof(atacap->revision)); - bswap(atacap->serial, sizeof(atacap->serial)); btrim(atacap->serial, sizeof(atacap->serial)); bpack(atacap->serial, atacap->serial, sizeof(atacap->serial)); if (bootverbose) -- cgit v1.3