Skip to content
Snippets Groups Projects
Commit bcdf1d2c authored by Richard Retanubun's avatar Richard Retanubun Committed by Wolfgang Denk
Browse files

common/cmd_ide.c: Corrected endian order printing for compact flash serial number.


Corrected endian order printing for compact flash serial number.

Signed-off-by: default avatarRichard Retanubun <RichardRetanubun@RuggedCom.com>
parent 16a28ef2
No related branches found
No related tags found
No related merge requests found
...@@ -1166,15 +1166,16 @@ static void ide_ident (block_dev_desc_t *dev_desc) ...@@ -1166,15 +1166,16 @@ static void ide_ident (block_dev_desc_t *dev_desc)
ident_cpy ((unsigned char*)dev_desc->product, iop->serial_no, sizeof(dev_desc->product)); ident_cpy ((unsigned char*)dev_desc->product, iop->serial_no, sizeof(dev_desc->product));
#ifdef __LITTLE_ENDIAN #ifdef __LITTLE_ENDIAN
/* /*
* firmware revision and model number have Big Endian Byte * firmware revision, model, and serial number have Big Endian Byte
* order in Word. Convert both to little endian. * order in Word. Convert all three to little endian.
* *
* See CF+ and CompactFlash Specification Revision 2.0: * See CF+ and CompactFlash Specification Revision 2.0:
* 6.2.1.6: Identfy Drive, Table 39 for more details * 6.2.1.6: Identify Drive, Table 39 for more details
*/ */
strswab (dev_desc->revision); strswab (dev_desc->revision);
strswab (dev_desc->vendor); strswab (dev_desc->vendor);
strswab (dev_desc->product);
#endif /* __LITTLE_ENDIAN */ #endif /* __LITTLE_ENDIAN */
if ((iop->config & 0x0080)==0x0080) if ((iop->config & 0x0080)==0x0080)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment