diff options
author | Tejun Heo <htejun@gmail.com> | 2006-02-12 22:47:04 +0900 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2006-02-12 14:24:41 -0500 |
commit | 2e02671daa2cd69d93c828c40579bbe953f17210 (patch) | |
tree | bcafe5d5b36be475de57081600fae13408cd0c4e /drivers/scsi/libata-scsi.c | |
parent | 0e949ff304a7ca07db38c17fbbf3ead1085d7bbf (diff) | |
download | linux-2e02671daa2cd69d93c828c40579bbe953f17210.tar.gz linux-2e02671daa2cd69d93c828c40579bbe953f17210.tar.bz2 linux-2e02671daa2cd69d93c828c40579bbe953f17210.zip |
[PATCH] libata: use ata_dev_id_c_string()
Use ata_dev_id_c_string()
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Diffstat (limited to 'drivers/scsi/libata-scsi.c')
-rw-r--r-- | drivers/scsi/libata-scsi.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/scsi/libata-scsi.c b/drivers/scsi/libata-scsi.c index 26f07a2617f9..ebd7cf42550b 100644 --- a/drivers/scsi/libata-scsi.c +++ b/drivers/scsi/libata-scsi.c @@ -1806,15 +1806,12 @@ static int ata_dev_supports_fua(u16 *id) if (!ata_id_has_fua(id)) return 0; - model[40] = '\0'; - fw[8] = '\0'; + ata_dev_id_c_string(id, model, ATA_ID_PROD_OFS, sizeof(model)); + ata_dev_id_c_string(id, fw, ATA_ID_FW_REV_OFS, sizeof(fw)); - ata_dev_id_string(id, model, ATA_ID_PROD_OFS, sizeof(model) - 1); - ata_dev_id_string(id, fw, ATA_ID_FW_REV_OFS, sizeof(fw) - 1); - - if (strncmp(model, "Maxtor", 6)) + if (strcmp(model, "Maxtor")) return 1; - if (strncmp(fw, "BANC1G10", 8)) + if (strcmp(fw, "BANC1G10")) return 1; return 0; /* blacklisted */ |