From 995b475caf9ea467961fba73f18e58acee77a1dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Duval?= Date: Mon, 6 Sep 2010 18:53:47 +0000 Subject: [PATCH] Patch from dachaac (bug #4813): Fix ATA vendor and product strings according to ATA string conventions. Thanks! git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38547 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/add-ons/kernel/bus_managers/ata/ATADevice.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/add-ons/kernel/bus_managers/ata/ATADevice.cpp b/src/add-ons/kernel/bus_managers/ata/ATADevice.cpp index 4317c8ec74..459677287f 100644 --- a/src/add-ons/kernel/bus_managers/ata/ATADevice.cpp +++ b/src/add-ons/kernel/bus_managers/ata/ATADevice.cpp @@ -148,8 +148,12 @@ ATADevice::Inquiry(ATARequest *request) // 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;