mirror of
https://github.com/systemd/systemd.git
synced 2026-07-25 16:55:44 +00:00
ata_id: unreverse WWN identifier
An endianness conversion was lost in 6024a6e302.
Restore it. Now ata_id and scsi_id output match.
https://bugzilla.redhat.com/show_bug.cgi?id=1227503
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