Merge pull request #651 from keszybz/ata_id-wwn-ordering
ata_id: unreverse WWN identifier
This commit is contained in:
@@ -638,10 +638,20 @@ int main(int argc, char *argv[])
|
||||
* All other values are reserved.
|
||||
*/
|
||||
word = identify.wyde[108];
|
||||
if ((word & 0xf000) == 0x5000)
|
||||
if ((word & 0xf000) == 0x5000) {
|
||||
uint64_t wwwn;
|
||||
|
||||
wwwn = identify.wyde[108];
|
||||
wwwn <<= 16;
|
||||
wwwn |= identify.wyde[109];
|
||||
wwwn <<= 16;
|
||||
wwwn |= identify.wyde[110];
|
||||
wwwn <<= 16;
|
||||
wwwn |= identify.wyde[111];
|
||||
printf("ID_WWN=0x%1$" PRIx64 "\n"
|
||||
"ID_WWN_WITH_EXTENSION=0x%1$" PRIx64 "\n",
|
||||
identify.octa[108/4]);
|
||||
wwwn);
|
||||
}
|
||||
|
||||
/* from Linux's include/linux/ata.h */
|
||||
if (identify.wyde[0] == 0x848a ||
|
||||
|
||||
Reference in New Issue
Block a user