aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide
diff options
context:
space:
mode:
authorBorislav Petkov <petkovbb@googlemail.com>2008-09-27 13:32:17 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-09-27 13:32:17 -0400
commit801bd32e205ca6ef78dcaf80121f1eccb89b8c1e (patch)
tree4ccb3cb628a55a7eabb6ecf7f8a09fc8e6a75f98 /drivers/ide
parent3d977760b9478538821a75dd5eb74d0f2a2b01e3 (diff)
ide-tape: fix vendor strings
Remove superfluous two bytes from each string buffer and add proper length format specifiers. Signed-off-by: Borislav Petkov <petkovbb@gmail.com> Tested-by: Mark de Wever <koraq@xs4all.nl> Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide')
-rw-r--r--drivers/ide/ide-tape.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c
index 1bce84b56630..3833189144ed 100644
--- a/drivers/ide/ide-tape.c
+++ b/drivers/ide/ide-tape.c
@@ -2338,7 +2338,7 @@ static void idetape_get_inquiry_results(ide_drive_t *drive)
2338{ 2338{
2339 idetape_tape_t *tape = drive->driver_data; 2339 idetape_tape_t *tape = drive->driver_data;
2340 struct ide_atapi_pc pc; 2340 struct ide_atapi_pc pc;
2341 char fw_rev[6], vendor_id[10], product_id[18]; 2341 char fw_rev[4], vendor_id[8], product_id[16];
2342 2342
2343 idetape_create_inquiry_cmd(&pc); 2343 idetape_create_inquiry_cmd(&pc);
2344 if (idetape_queue_pc_tail(drive, &pc)) { 2344 if (idetape_queue_pc_tail(drive, &pc)) {
@@ -2350,11 +2350,11 @@ static void idetape_get_inquiry_results(ide_drive_t *drive)
2350 memcpy(product_id, &pc.buf[16], 16); 2350 memcpy(product_id, &pc.buf[16], 16);
2351 memcpy(fw_rev, &pc.buf[32], 4); 2351 memcpy(fw_rev, &pc.buf[32], 4);
2352 2352
2353 ide_fixstring(vendor_id, 10, 0); 2353 ide_fixstring(vendor_id, 8, 0);
2354 ide_fixstring(product_id, 18, 0); 2354 ide_fixstring(product_id, 16, 0);
2355 ide_fixstring(fw_rev, 6, 0); 2355 ide_fixstring(fw_rev, 4, 0);
2356 2356
2357 printk(KERN_INFO "ide-tape: %s <-> %s: %s %s rev %s\n", 2357 printk(KERN_INFO "ide-tape: %s <-> %s: %.8s %.16s rev %.4s\n",
2358 drive->name, tape->name, vendor_id, product_id, fw_rev); 2358 drive->name, tape->name, vendor_id, product_id, fw_rev);
2359} 2359}
2360 2360