[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>
This commit is contained in:
Tejun Heo
2006-02-12 22:47:04 +09:00
committed by Jeff Garzik
parent 0e949ff304
commit 2e02671daa
3 changed files with 13 additions and 35 deletions

View File

@@ -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 */