[PATCH] ata_id: fix identify string fixup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 src/extras/ata_id/ata_id.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/extras/ata_id/ata_id.c b/src/extras/ata_id/ata_id.c
index 924d479..c8ffe86 100644
--- a/src/extras/ata_id/ata_id.c
+++ b/src/extras/ata_id/ata_id.c
@@ -307,8 +307,8 @@ static void disk_identify_get_string (uint8_t identify[512],
         assert ((dest_len & 1) == 0);
 
         while (dest_len > 0) {
-                c1 = ((uint16_t *) identify)[offset_words] >> 8;
-                c2 = ((uint16_t *) identify)[offset_words] & 0xff;
+                c1 = identify[offset_words * 2 + 1];
+                c2 = identify[offset_words * 2];
                 *dest = c1;
                 dest++;
                 *dest = c2;
-- 
1.7.9


-- 
Andreas Schwab, schwab@xxxxxxxxxxxxxx
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."
--
To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel]     [Linux DVB]     [Asterisk Internet PBX]     [DCCP]     [Netdev]     [X.org]     [Util Linux NG]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux