summaryrefslogtreecommitdiff
path: root/extras/edd_id
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2008-04-20 21:07:06 +0200
committerKay Sievers <kay.sievers@vrfy.org>2008-04-20 21:07:06 +0200
commitc70560feef0eb61a150cd2f956f0beead4313ffe (patch)
tree48db1f001e87e46b0ccd2b30704b87a8662ba9b9 /extras/edd_id
parent1d918b50cddc975abbfd06af134a6d843d9bc7f0 (diff)
logging: add trailing newline to all strings
Diffstat (limited to 'extras/edd_id')
-rw-r--r--extras/edd_id/edd_id.c28
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;