diff options
Diffstat (limited to 'extras/ata_id')
-rw-r--r-- | extras/ata_id/ata_id.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/extras/ata_id/ata_id.c b/extras/ata_id/ata_id.c index 34b1ccdff1..54c3c29feb 100644 --- a/extras/ata_id/ata_id.c +++ b/extras/ata_id/ata_id.c @@ -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); |