1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-12-24 21:34:08 +03:00

ata_id: unbotch format specifier

Commit v218-247-g11c6f69 broke the output of the utility. "%1$" PRIu64
"x" expands to "%1$lux", essentially "%lux", which shows the problem.
u and x cannot be combined, u wins as the type character, and x gets
emitted verbatim to stdout.

References: https://bugzilla.redhat.com/show_bug.cgi?id=1227503
This commit is contained in:
Jan Engelhardt 2015-06-24 01:48:18 +02:00 committed by Harald Hoyer
parent 0891c5ed0b
commit ec62e85873

View File

@ -639,8 +639,8 @@ int main(int argc, char *argv[])
*/ */
word = identify.wyde[108]; word = identify.wyde[108];
if ((word & 0xf000) == 0x5000) if ((word & 0xf000) == 0x5000)
printf("ID_WWN=0x%1$"PRIu64"x\n" printf("ID_WWN=0x%1$" PRIx64 "\n"
"ID_WWN_WITH_EXTENSION=0x%1$"PRIu64"x\n", "ID_WWN_WITH_EXTENSION=0x%1$" PRIx64 "\n",
identify.octa[108/4]); identify.octa[108/4]);
/* from Linux's include/linux/ata.h */ /* from Linux's include/linux/ata.h */