diff options
Diffstat (limited to 'extras/edd_id/edd_id.c')
-rw-r--r-- | extras/edd_id/edd_id.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/extras/edd_id/edd_id.c b/extras/edd_id/edd_id.c index 4ba89ede89..4a177709a8 100644 --- a/extras/edd_id/edd_id.c +++ b/extras/edd_id/edd_id.c @@ -75,7 +75,7 @@ int main(int argc, char *argv[]) node = arg; } if (node == NULL) { - err("no node specified"); + err("no node specified\n"); fprintf(stderr, "no node specified\n"); goto exit; } @@ -83,7 +83,7 @@ int main(int argc, char *argv[]) /* check for kernel support */ dir = opendir("/sys/firmware/edd"); if (dir == NULL) { - info("no kernel EDD support"); + info("no kernel EDD support\n"); fprintf(stderr, "no kernel EDD support\n"); rc = 2; goto exit; @@ -91,7 +91,7 @@ int main(int argc, char *argv[]) disk_fd = open(node, O_RDONLY); if (disk_fd < 0) { - info("unable to open '%s'", node); + info("unable to open '%s'\n", node); fprintf(stderr, "unable to open '%s'\n", node); rc = 3; goto closedir; @@ -99,38 +99,38 @@ int main(int argc, char *argv[]) /* check for valid MBR signature */ if (lseek(disk_fd, 510, SEEK_SET) < 0) { - info("seek to MBR validity failed '%s'", node); + info("seek to MBR validity failed '%s'\n", node); rc = 4; goto close; } if (read(disk_fd, &mbr_valid, sizeof(mbr_valid)) != sizeof(mbr_valid)) { - info("read MBR validity failed '%s'", node); + info("read MBR validity failed '%s'\n", node); rc = 5; goto close; } if (mbr_valid != 0xAA55) { fprintf(stderr, "no valid MBR signature '%s'\n", node); - info("no valid MBR signature '%s'", node); + info("no valid MBR signature '%s'\n", node); rc=6; goto close; } /* read EDD signature */ if (lseek(disk_fd, 440, SEEK_SET) < 0) { - info("seek to signature failed '%s'", node); + info("seek to signature failed '%s'\n", node); rc = 7; goto close; } if (read(disk_fd, &disk_id, sizeof(disk_id)) != sizeof(disk_id)) { - info("read signature failed '%s'", node); + info("read signature failed '%s'\n", node); rc = 8; goto close; } /* all zero is invalid */ - info("read id 0x%08x from '%s'", disk_id, node); + info("read id 0x%08x from '%s'\n", disk_id, node); if (disk_id == 0) { fprintf(stderr, "no EDD signature '%s'\n", node); - info("'%s' signature is zero", node); + info("'%s' signature is zero\n", node); rc = 9; goto close; } @@ -150,18 +150,18 @@ int main(int argc, char *argv[]) sysfs_fd = open(file, O_RDONLY); if (sysfs_fd < 0) { - info("unable to open sysfs '%s'", file); + info("unable to open sysfs '%s'\n", file); continue; } size = read(sysfs_fd, sysfs_id_buf, sizeof(sysfs_id_buf)-1); close(sysfs_fd); if (size <= 0) { - info("read sysfs '%s' failed", file); + info("read sysfs '%s' failed\n", file); continue; } sysfs_id_buf[size] = '\0'; - info("read '%s' from '%s'", sysfs_id_buf, file); + info("read '%s' from '%s'\n", sysfs_id_buf, file); sysfs_id = strtoul(sysfs_id_buf, NULL, 16); /* look for matching value, that appears only once */ @@ -171,7 +171,7 @@ int main(int argc, char *argv[]) strlcpy(match, dent->d_name, sizeof(match)); } else { /* error, same signature for another device */ - info("'%s' does not have a unique signature", node); + info("'%s' does not have a unique signature\n", node); fprintf(stderr, "'%s' does not have a unique signature\n", node); rc = 10; goto exit; |