[haiku-commits] r38547 - haiku/trunk/src/add-ons/kernel/bus_managers/ata

  • From: korli@xxxxxxxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Mon, 6 Sep 2010 20:53:47 +0200 (CEST)

Author: korli
Date: 2010-09-06 20:53:47 +0200 (Mon, 06 Sep 2010)
New Revision: 38547
Changeset: http://dev.haiku-os.org/changeset/38547
Ticket: http://dev.haiku-os.org/ticket/4813

Modified:
   haiku/trunk/src/add-ons/kernel/bus_managers/ata/ATADevice.cpp
Log:
Patch from dachaac (bug #4813): Fix ATA vendor and product strings according to 
ATA string conventions. Thanks!


Modified: haiku/trunk/src/add-ons/kernel/bus_managers/ata/ATADevice.cpp
===================================================================
--- haiku/trunk/src/add-ons/kernel/bus_managers/ata/ATADevice.cpp       
2010-09-06 18:45:48 UTC (rev 38546)
+++ haiku/trunk/src/add-ons/kernel/bus_managers/ata/ATADevice.cpp       
2010-09-06 18:53:47 UTC (rev 38547)
@@ -148,8 +148,12 @@
        // the following fields are *much* to small, sigh...
        memcpy(data.vendor_ident, fInfoBlock.model_number,
                sizeof(data.vendor_ident));
+       swap_words(data.vendor_ident, sizeof(data.vendor_ident));
+
        memcpy(data.product_ident, fInfoBlock.model_number + 8,
                sizeof(data.product_ident));
+       swap_words(data.product_ident, sizeof(data.product_ident));
+
        memcpy(data.product_rev, "    ", sizeof(data.product_rev));
 
        uint32 allocationLength = command->allocation_length;


Other related posts: