- Subject: [PATCH] ata_id: fix identify string fixup
- From: Andreas Schwab <schwab@xxxxxxxxxxxxxx>
- Date: Mon, 30 Jan 2012 11:51:05 +0100
- User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.93 (gnu/linux)
---
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
[Linux DVB]
[Video Technology]
[Asterisk]
[Photo]
[DCCP]
[Netdev]
[Xorg]
[Util Linux NG]
[Xfree86]
[Devices]
[Fedora Women]
[ALSA Devel]
[Linux USB]