mirror of
https://github.com/systemd/systemd.git
synced 2025-03-19 22:50:17 +03:00
ata_id: check for empty serial number
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
This commit is contained in:
parent
4431072fb8
commit
e03bce6321
@ -167,8 +167,12 @@ int main(int argc, char *argv[])
|
||||
printf("ID_MODEL=%s\n", model);
|
||||
printf("ID_SERIAL=%s\n", serial);
|
||||
printf("ID_REVISION=%s\n", revision);
|
||||
} else
|
||||
printf("%s_%s\n", model, serial);
|
||||
} else {
|
||||
if (serial[0] != '\0')
|
||||
printf("%s_%s\n", model, serial);
|
||||
else
|
||||
printf("%s\n", model);
|
||||
}
|
||||
|
||||
close:
|
||||
close(fd);
|
||||
|
Loading…
x
Reference in New Issue
Block a user