summaryrefslogtreecommitdiff
path: root/extras
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
parent1d918b50cddc975abbfd06af134a6d843d9bc7f0 (diff)
logging: add trailing newline to all strings
Diffstat (limited to 'extras')
-rw-r--r--extras/ata_id/ata_id.c8
-rw-r--r--extras/cdrom_id/cdrom_id.c37
-rw-r--r--extras/edd_id/edd_id.c28
-rw-r--r--extras/scsi_id/scsi_id.c40
-rw-r--r--extras/scsi_id/scsi_serial.c76
-rw-r--r--extras/usb_id/usb_id.c24
-rw-r--r--extras/volume_id/lib/adaptec_raid.c2
-rw-r--r--extras/volume_id/lib/cramfs.c2
-rw-r--r--extras/volume_id/lib/ddf_raid.c2
-rw-r--r--extras/volume_id/lib/ext.c6
-rw-r--r--extras/volume_id/lib/fat.c40
-rw-r--r--extras/volume_id/lib/gfs.c2
-rw-r--r--extras/volume_id/lib/hfs.c32
-rw-r--r--extras/volume_id/lib/highpoint.c4
-rw-r--r--extras/volume_id/lib/hpfs.c2
-rw-r--r--extras/volume_id/lib/iso9660.c12
-rw-r--r--extras/volume_id/lib/isw_raid.c2
-rw-r--r--extras/volume_id/lib/jfs.c2
-rw-r--r--extras/volume_id/lib/jmicron_raid.c2
-rw-r--r--extras/volume_id/lib/linux_raid.c4
-rw-r--r--extras/volume_id/lib/linux_swap.c2
-rw-r--r--extras/volume_id/lib/lsi_raid.c2
-rw-r--r--extras/volume_id/lib/lvm.c6
-rw-r--r--extras/volume_id/lib/minix.c2
-rw-r--r--extras/volume_id/lib/netware.c2
-rw-r--r--extras/volume_id/lib/ntfs.c24
-rw-r--r--extras/volume_id/lib/nvidia_raid.c2
-rw-r--r--extras/volume_id/lib/ocfs.c6
-rw-r--r--extras/volume_id/lib/promise_raid.c2
-rw-r--r--extras/volume_id/lib/reiserfs.c2
-rw-r--r--extras/volume_id/lib/romfs.c2
-rw-r--r--extras/volume_id/lib/silicon_raid.c2
-rw-r--r--extras/volume_id/lib/squashfs.c2
-rw-r--r--extras/volume_id/lib/sysv.c2
-rw-r--r--extras/volume_id/lib/udf.c12
-rw-r--r--extras/volume_id/lib/ufs.c8
-rw-r--r--extras/volume_id/lib/util.c28
-rw-r--r--extras/volume_id/lib/via_raid.c2
-rw-r--r--extras/volume_id/lib/volume_id.c6
-rw-r--r--extras/volume_id/lib/vxfs.c2
-rw-r--r--extras/volume_id/lib/xfs.c2
-rw-r--r--extras/volume_id/vol_id.c6
42 files changed, 225 insertions, 226 deletions
diff --git a/extras/ata_id/ata_id.c b/extras/ata_id/ata_id.c
index f94cdc0fd3..6d3c2330b4 100644
--- a/extras/ata_id/ata_id.c
+++ b/extras/ata_id/ata_id.c
@@ -126,24 +126,24 @@ int main(int argc, char *argv[])
node = argv[optind];
if (node == NULL) {
- err("no node specified");
+ err("no node specified\n");
rc = 1;
goto exit;
}
fd = open(node, O_RDONLY|O_NONBLOCK);
if (fd < 0) {
- err("unable to open '%s'", node);
+ err("unable to open '%s'\n", node);
rc = 1;
goto exit;
}
if (ioctl(fd, HDIO_GET_IDENTITY, &id)) {
if (errno == ENOTTY) {
- info("HDIO_GET_IDENTITY unsupported for '%s'", node);
+ info("HDIO_GET_IDENTITY unsupported for '%s'\n", node);
rc = 2;
} else {
- err("HDIO_GET_IDENTITY failed for '%s'", node);
+ err("HDIO_GET_IDENTITY failed for '%s'\n", node);
rc = 3;
}
goto close;
diff --git a/extras/cdrom_id/cdrom_id.c b/extras/cdrom_id/cdrom_id.c
index 315d27610f..b88f5b4b1e 100644
--- a/extras/cdrom_id/cdrom_id.c
+++ b/extras/cdrom_id/cdrom_id.c
@@ -71,7 +71,6 @@ void log_message(int priority, const char *format, ...)
if (debug) {
fprintf(stderr, "[%d] ", (int) getpid());
vfprintf(stderr, format, args);
- fprintf(stderr, "\n");
} else
vsyslog(priority, format, args);
va_end(args);
@@ -137,10 +136,10 @@ static unsigned long long int cd_media_session_last_offset;
static void info_scsi_cmd_err(const char *cmd, int err)
{
if (err == -1) {
- info("%s failed", cmd);
+ info("%s failed\n", cmd);
return;
}
- info("%s failed with SK=%Xh/ASC=%02Xh/ACQ=%02Xh", cmd, SK(err), ASC(err), ASCQ(err));
+ info("%s failed with SK=%Xh/ASC=%02Xh/ACQ=%02Xh\n", cmd, SK(err), ASC(err), ASCQ(err));
}
struct scsi_cmd {
@@ -199,7 +198,7 @@ static int cd_capability_compat(int fd)
capabilty = ioctl(fd, CDROM_GET_CAPABILITY, NULL);
if (capabilty < 0) {
- info("CDROM_GET_CAPABILITY failed");
+ info("CDROM_GET_CAPABILITY failed\n");
return -1;
}
@@ -235,11 +234,11 @@ static int cd_inquiry(int fd) {
}
if ((inq[0] & 0x1F) != 5) {
- info("not an MMC unit");
+ info("not an MMC unit\n");
return -1;
}
- info("INQUIRY: [%.8s][%.16s][%.4s]", inq + 8, inq + 16, inq + 32);
+ info("INQUIRY: [%.8s][%.16s][%.4s]\n", inq + 8, inq + 16, inq + 32);
return 0;
}
@@ -264,9 +263,9 @@ static int cd_profiles(int fd)
}
len = 4 + (header[0] << 24 | header[1] << 16 | header[2] << 8 | header[3]);
- info("GET CONFIGURATION: number of profiles %i", len);
+ info("GET CONFIGURATION: number of profiles %i\n", len);
if (len > sizeof(profiles)) {
- info("invalid number of profiles");
+ info("invalid number of profiles\n");
return -1;
}
@@ -287,7 +286,7 @@ static int cd_profiles(int fd)
unsigned int profile = (profiles[i] << 8 | profiles[i + 1]);
if (profile == 0)
continue;
- info("profile 0x%02x", profile);
+ info("profile 0x%02x\n", profile);
switch (profile) {
case 0x03:
@@ -343,9 +342,9 @@ static int cd_profiles(int fd)
/* current media profile */
cur_profile = header[6] << 8 | header[7];
- info("current profile 0x%02x", cur_profile);
+ info("current profile 0x%02x\n", cur_profile);
if (cur_profile == 0) {
- info("no current profile, assuming no media");
+ info("no current profile, assuming no media\n");
return -1;
}
@@ -435,7 +434,7 @@ static int cd_media_info(int fd)
return -1;
};
- info("disk type %02x", header[8]);
+ info("disk type %02x\n", header[8]);
if ((header[2] & 3) < 4)
cd_media_state = media_status[header[2] & 3];
@@ -467,12 +466,12 @@ static int cd_media_toc(int fd)
}
len = (header[0] << 8 | header[1]) + 2;
- info("READ TOC: len: %d", len);
+ info("READ TOC: len: %d\n", len);
if (len > sizeof(toc))
return -1;
/* check if we have a data track */
- info("ctl %02x (0x04 is data/audio)", header[5]);
+ info("ctl %02x (0x04 is data/audio)\n", header[5]);
cd_media_has_audio = (header[5] & 0x04) == 0;
scsi_cmd_set(&sc, 0, 0x43);
@@ -490,7 +489,7 @@ static int cd_media_toc(int fd)
unsigned int block;
block = p[4] << 24 | p[5] << 16 | p[6] << 8 | p[7];
- info("track %u starts at block %u", p[2], block);
+ info("track %u starts at block %u\n", p[2], block);
}
scsi_cmd_set(&sc, 0, 0x43);
@@ -503,7 +502,7 @@ static int cd_media_toc(int fd)
return -1;
}
len = header[4+4] << 24 | header[4+5] << 16 | header[4+6] << 8 | header[4+7];
- info("last track %u starts at block %u", header[4+2], len);
+ info("last track %u starts at block %u\n", header[4+2], len);
cd_media_session_last_offset = (unsigned long long int)len * 2048;
return 0;
}
@@ -550,7 +549,7 @@ int main(int argc, char *argv[])
node = argv[optind];
if (!node) {
- err("no device");
+ err("no device\n");
fprintf(stderr, "no device\n");
rc = 1;
goto exit;
@@ -558,11 +557,11 @@ int main(int argc, char *argv[])
fd = open(node, O_RDONLY | O_NONBLOCK);
if (fd < 0) {
- info("unable to open '%s'", node);
+ info("unable to open '%s'\n", node);
rc = 1;
goto exit;
}
- info("probing: '%s'", node);
+ info("probing: '%s'\n", node);
/* same data as original cdrom_id */
if (cd_capability_compat(fd) < 0) {
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;
diff --git a/extras/scsi_id/scsi_id.c b/extras/scsi_id/scsi_id.c
index d8b269a950..463b3775cf 100644
--- a/extras/scsi_id/scsi_id.c
+++ b/extras/scsi_id/scsi_id.c
@@ -174,25 +174,25 @@ static int create_tmp_dev(const char *devpath, char *tmpdev, int dev_type)
unsigned int maj, min;
const char *attr;
- dbg("%s", devpath);
+ dbg("%s\n", devpath);
attr = sysfs_attr_get_value(devpath, "dev");
if (attr == NULL) {
- dbg("%s: could not get dev attribute: %s", devpath, strerror(errno));
+ dbg("%s: could not get dev attribute: %s\n", devpath, strerror(errno));
return -1;
}
- dbg("dev value %s", attr);
+ dbg("dev value %s\n", attr);
if (sscanf(attr, "%u:%u", &maj, &min) != 2) {
- err("%s: invalid dev major/minor", devpath);
+ err("%s: invalid dev major/minor\n", devpath);
return -1;
}
snprintf(tmpdev, MAX_PATH_LEN, "%s/%s-maj%d-min%d-%u",
TMP_DIR, TMP_PREFIX, maj, min, getpid());
- dbg("tmpdev '%s'", tmpdev);
+ dbg("tmpdev '%s'\n", tmpdev);
if (mknod(tmpdev, 0600 | dev_type, makedev(maj, min))) {
- err("mknod failed: %s", strerror(errno));
+ err("mknod failed: %s\n", strerror(errno));
return -1;
}
return 0;
@@ -273,7 +273,7 @@ static int get_file_options(const char *vendor, const char *model,
if (errno == ENOENT) {
return 1;
} else {
- err("can't open %s: %s", config_file, strerror(errno));
+ err("can't open %s: %s\n", config_file, strerror(errno));
return -1;
}
}
@@ -285,7 +285,7 @@ static int get_file_options(const char *vendor, const char *model,
*/
buffer = malloc(MAX_BUFFER_LEN);
if (!buffer) {
- err("Can't allocate memory.");
+ err("can't allocate memory\n");
return -1;
}
@@ -299,7 +299,7 @@ static int get_file_options(const char *vendor, const char *model,
break;
lineno++;
if (buf[strlen(buffer) - 1] != '\n') {
- info("Config file line %d too long.\n", lineno);
+ info("Config file line %d too long\n", lineno);
break;
}
@@ -344,14 +344,14 @@ static int get_file_options(const char *vendor, const char *model,
}
options_in = str1;
}
- dbg("config file line %d:"
+ dbg("config file line %d:\n"
" vendor '%s'; model '%s'; options '%s'\n",
lineno, vendor_in, model_in, options_in);
/*
* Only allow: [vendor=foo[,model=bar]]options=stuff
*/
if (!options_in || (!vendor_in && model_in)) {
- info("Error parsing config file line %d '%s'", lineno, buffer);
+ info("Error parsing config file line %d '%s'\n", lineno, buffer);
retval = -1;
break;
}
@@ -389,7 +389,7 @@ static int get_file_options(const char *vendor, const char *model,
c = argc_count(buffer) + 2;
*newargv = calloc(c, sizeof(**newargv));
if (!*newargv) {
- err("Can't allocate memory.");
+ err("can't allocate memory\n");
retval = -1;
} else {
*argc = c;
@@ -492,7 +492,7 @@ static int set_options(int argc, char **argv, const char *short_opts,
} else if (strcmp(optarg, "pre-spc3-83") == 0) {
default_page_code = PAGE_83_PRE_SPC3;
} else {
- info("Unknown page code '%s'", optarg);
+ info("Unknown page code '%s'\n", optarg);
return -1;
}
break;
@@ -571,13 +571,13 @@ static int per_dev_options(struct sysfs_device *dev_scsi, int *good_bad, int *pa
} else if (strcmp(optarg, "pre-spc3-83") == 0) {
*page_code = PAGE_83_PRE_SPC3;
} else {
- info("Unknown page code '%s'", optarg);
+ info("Unknown page code '%s'\n", optarg);
retval = -1;
}
break;
default:
- info("Unknown or bad option '%c' (0x%x)", option, option);
+ info("Unknown or bad option '%c' (0x%x)\n", option, option);
retval = -1;
break;
}
@@ -596,7 +596,7 @@ static int set_sysfs_values(struct sysfs_device *dev_scsi)
vendor = sysfs_attr_get_value(dev_scsi->devpath, "vendor");
if (!vendor) {
- info("%s: cannot get vendor attribute", dev_scsi->devpath);
+ info("%s: cannot get vendor attribute\n", dev_scsi->devpath);
return -1;
}
set_str(vendor_str, vendor, sizeof(vendor_str)-1);
@@ -610,7 +610,7 @@ static int set_sysfs_values(struct sysfs_device *dev_scsi)
type = sysfs_attr_get_value(dev_scsi->devpath, "type");
if (!type) {
- info("%s: cannot get type attribute", dev_scsi->devpath);
+ info("%s: cannot get type attribute\n", dev_scsi->devpath);
return -1;
}
set_type(type_str, type, sizeof(type_str));
@@ -690,7 +690,7 @@ static int scsi_id(const char *devpath, char *maj_min_dev)
dev = sysfs_device_get(devpath);
if (dev == NULL) {
- err("unable to access '%s'", devpath);
+ err("unable to access '%s'\n", devpath);
return 1;
}
@@ -709,7 +709,7 @@ static int scsi_id(const char *devpath, char *maj_min_dev)
/* get scsi parent device */
dev_scsi = sysfs_device_get_parent_with_subsystem(dev, "scsi");
if (dev_scsi == NULL) {
- err("unable to access parent device of '%s'", devpath);
+ err("unable to access parent device of '%s'\n", devpath);
return 1;
}
set_sysfs_values(dev_scsi);
@@ -721,7 +721,7 @@ static int scsi_id(const char *devpath, char *maj_min_dev)
/* get per device (vendor + model) options from the config file */
retval = per_dev_options(dev_scsi, &good_dev, &page_code);
- dbg("per dev options: good %d; page code 0x%x", good_dev, page_code);
+ dbg("per dev options: good %d; page code 0x%x\n", good_dev, page_code);
if (!good_dev) {
retval = 1;
diff --git a/extras/scsi_id/scsi_serial.c b/extras/scsi_id/scsi_serial.c
index c84f41e043..28e82db3ca 100644
--- a/extras/scsi_id/scsi_serial.c
+++ b/extras/scsi_id/scsi_serial.c
@@ -179,7 +179,7 @@ static int scsi_dump_sense(struct sysfs_device *dev_scsi, struct sg_io_hdr *io)
sb_len = io->sb_len_wr;
if (sb_len < 1) {
- info("%s: sense buffer empty", dev_scsi->kernel);
+ info("%s: sense buffer empty\n", dev_scsi->kernel);
return -1;
}
@@ -193,7 +193,7 @@ static int scsi_dump_sense(struct sysfs_device *dev_scsi, struct sg_io_hdr *io)
*/
s = sense_buffer[7] + 8;
if (sb_len < s) {
- info("%s: sense buffer too small %d bytes, %d bytes too short",
+ info("%s: sense buffer too small %d bytes, %d bytes too short\n",
dev_scsi->kernel, sb_len, s - sb_len);
return -1;
}
@@ -204,7 +204,7 @@ static int scsi_dump_sense(struct sysfs_device *dev_scsi, struct sg_io_hdr *io)
/*
* Possible?
*/
- info("%s: sense result too" " small %d bytes",
+ info("%s: sense result too" " small %d bytes\n",
dev_scsi->kernel, s);
return -1;
}
@@ -216,25 +216,25 @@ static int scsi_dump_sense(struct sysfs_device *dev_scsi, struct sg_io_hdr *io)
asc = sense_buffer[2];
ascq = sense_buffer[3];
} else {
- info("%s: invalid sense code 0x%x",
+ info("%s: invalid sense code 0x%x\n",
dev_scsi->kernel, code);
return -1;
}
- info("%s: sense key 0x%x ASC 0x%x ASCQ 0x%x",
+ info("%s: sense key 0x%x ASC 0x%x ASCQ 0x%x\n",
dev_scsi->kernel, sense_key, asc, ascq);
} else {
if (sb_len < 4) {
- info("%s: sense buffer too small %d bytes, %d bytes too short",
+ info("%s: sense buffer too small %d bytes, %d bytes too short\n",
dev_scsi->kernel, sb_len, 4 - sb_len);
return -1;
}
if (sense_buffer[0] < 15)
- info("%s: old sense key: 0x%x", dev_scsi->kernel, sense_buffer[0] & 0x0f);
+ info("%s: old sense key: 0x%x\n", dev_scsi->kernel, sense_buffer[0] & 0x0f);
else
- info("%s: sense = %2x %2x",
+ info("%s: sense = %2x %2x\n",
dev_scsi->kernel, sense_buffer[0], sense_buffer[2]);
- info("%s: non-extended sense class %d code 0x%0x",
+ info("%s: non-extended sense class %d code 0x%0x\n",
dev_scsi->kernel, sense_class, code);
}
@@ -247,8 +247,8 @@ static int scsi_dump_sense(struct sysfs_device *dev_scsi, struct sg_io_hdr *io)
out_buffer[j++] = ' ';
}
out_buffer[j] = '\0';
- info("%s: sense dump:", dev_scsi->kernel);
- info("%s: %s", dev_scsi->kernel, out_buffer);
+ info("%s: sense dump:\n", dev_scsi->kernel);
+ info("%s: %s\n", dev_scsi->kernel, out_buffer);
#endif
return -1;
@@ -261,11 +261,11 @@ static int scsi_dump(struct sysfs_device *dev_scsi, struct sg_io_hdr *io)
/*
* Impossible, should not be called.
*/
- info("%s: called with no error", __FUNCTION__);
+ info("%s: called with no error\n", __FUNCTION__);
return -1;
}
- info("%s: sg_io failed status 0x%x 0x%x 0x%x 0x%x",
+ info("%s: sg_io failed status 0x%x 0x%x 0x%x 0x%x\n",
dev_scsi->kernel, io->driver_status, io->host_status, io->msg_status, io->status);
if (io->status == SCSI_CHECK_CONDITION)
return scsi_dump_sense(dev_scsi, io);
@@ -285,7 +285,7 @@ static int scsi_inquiry(struct sysfs_device *dev_scsi, int fd,
int retry = 3; /* rather random */
if (buflen > SCSI_INQ_BUFF_LEN) {
- info("buflen %d too long", buflen);
+ info("buflen %d too long\n", buflen);
return -1;
}
@@ -304,7 +304,7 @@ resend:
io_hdr.timeout = DEF_TIMEOUT;
if (ioctl(fd, SG_IO, &io_hdr) < 0) {
- info("%s: ioctl failed: %s", dev_scsi->kernel, strerror(errno));
+ info("%s: ioctl failed: %s\n", dev_scsi->kernel, strerror(errno));
retval = -1;
goto error;
}
@@ -336,7 +336,7 @@ resend:
error:
if (retval < 0)
- info("%s: Unable to get INQUIRY vpd %d page 0x%x.",
+ info("%s: Unable to get INQUIRY vpd %d page 0x%x.\n",
dev_scsi->kernel, evpd, page);
return retval;
@@ -355,11 +355,11 @@ static int do_scsi_page0_inquiry(struct sysfs_device *dev_scsi, int fd,
return 1;
if (buffer[1] != 0) {
- info("%s: page 0 not available.", dev_scsi->kernel);
+ info("%s: page 0 not available.\n", dev_scsi->kernel);
return 1;
}
if (buffer[3] > len) {
- info("%s: page 0 buffer too long %d", dev_scsi->kernel, buffer[3]);
+ info("%s: page 0 buffer too long %d\n", dev_scsi->kernel, buffer[3]);
return 1;
}
@@ -377,11 +377,11 @@ static int do_scsi_page0_inquiry(struct sysfs_device *dev_scsi, int fd,
*/
vendor = sysfs_attr_get_value(dev_scsi->devpath, "vendor");
if (!vendor) {
- info("%s: cannot get model attribute", dev_scsi->kernel);
+ info("%s: cannot get model attribute\n", dev_scsi->kernel);
return 1;
}
if (!strncmp((char *)&buffer[VENDOR_LENGTH], vendor, VENDOR_LENGTH)) {
- info("%s: invalid page0 data", dev_scsi->kernel);
+ info("%s: invalid page0 data\n", dev_scsi->kernel);
return 1;
}
}
@@ -399,7 +399,7 @@ static int prepend_vendor_model(struct sysfs_device *dev_scsi, char *serial)
attr = sysfs_attr_get_value(dev_scsi->devpath, "vendor");
if (!attr) {
- info("%s: cannot get vendor attribute", dev_scsi->kernel);
+ info("%s: cannot get vendor attribute\n", dev_scsi->kernel);
return 1;
}
strncpy(serial, attr, VENDOR_LENGTH);
@@ -407,7 +407,7 @@ static int prepend_vendor_model(struct sysfs_device *dev_scsi, char *serial)
attr = sysfs_attr_get_value(dev_scsi->devpath, "model");
if (!attr) {
- info("%s: cannot get model attribute", dev_scsi->kernel);
+ info("%s: cannot get model attribute\n", dev_scsi->kernel);
return 1;
}
strncat(serial, attr, MODEL_LENGTH);
@@ -419,7 +419,7 @@ static int prepend_vendor_model(struct sysfs_device *dev_scsi, char *serial)
* above, ind will never be too large.
*/
if (ind != (VENDOR_LENGTH + MODEL_LENGTH)) {
- info("%s: expected length %d, got length %d",
+ info("%s: expected length %d, got length %d\n",
dev_scsi->kernel, (VENDOR_LENGTH + MODEL_LENGTH), ind);
return 1;
}
@@ -477,7 +477,7 @@ static int check_fill_0x83_id(struct sysfs_device *dev_scsi,
len += VENDOR_LENGTH + MODEL_LENGTH;
if (max_len < len) {
- info("%s: length %d too short - need %d",
+ info("%s: length %d too short - need %d\n",
dev_scsi->kernel, max_len, len);
return 1;
}
@@ -528,7 +528,7 @@ static int check_fill_0x83_prespc3(struct sysfs_device *dev_scsi,
{
int i, j;
- dbg("using pre-spc3-83 for %s.\n", dev_scsi->kernel);
+ dbg("using pre-spc3-83 for %s\n", dev_scsi->kernel);
serial[0] = hex_str[id_search->id_type];
/* serial has been memset to zero before */
j = strlen(serial); /* j = 1; */
@@ -557,7 +557,7 @@ static int do_scsi_page83_inquiry(struct sysfs_device *dev_scsi, int fd,
return 1;
if (page_83[1] != PAGE_83) {
- info("%s: Invalid page 0x83", dev_scsi->kernel);
+ info("%s: Invalid page 0x83\n", dev_scsi->kernel);
return 1;
}
@@ -613,13 +613,13 @@ static int do_scsi_page83_inquiry(struct sysfs_device *dev_scsi, int fd,
id_search_list[id_ind].naa_type,
id_search_list[id_ind].code_set);
if (!retval) {
- dbg(" used\n");
+ dbg(" used\n");
return retval;
} else if (retval < 0) {
- dbg(" failed\n");
+ dbg(" failed\n");
return retval;
} else {
- dbg(" not used\n");
+ dbg(" not used\n");
}
}
}
@@ -646,7 +646,7 @@ static int do_scsi_page83_prespc3_inquiry(struct sysfs_device *dev_scsi, int fd,
return 1;
if (page_83[1] != PAGE_83) {
- info("%s: Invalid page 0x83", dev_scsi->kernel);
+ info("%s: Invalid page 0x83\n", dev_scsi->kernel);
return 1;
}
/*
@@ -690,7 +690,7 @@ static int do_scsi_page83_prespc3_inquiry(struct sysfs_device *dev_scsi, int fd,
serial[j++] = hex_str[page_83[i] & 0x0f];
i++;
}
- dbg("using pre-spc3-83 for %s.\n", dev_scsi->kernel);
+ dbg("using pre-spc3-83 for %s\n", dev_scsi->kernel);
return 0;
}
@@ -710,13 +710,13 @@ static int do_scsi_page80_inquiry(struct sysfs_device *dev_scsi, int fd,
return retval;
if (buf[1] != PAGE_80) {
- info("%s: Invalid page 0x80", dev_scsi->kernel);
+ info("%s: Invalid page 0x80\n", dev_scsi->kernel);
return 1;
}
len = 1 + VENDOR_LENGTH + MODEL_LENGTH + buf[3];
if (max_len < len) {
- info("%s: length %d too short - need %d",
+ info("%s: length %d too short - need %d\n",
dev_scsi->kernel, max_len, len);
return 1;
}
@@ -746,7 +746,7 @@ int scsi_std_inquiry(struct sysfs_device *dev_scsi, const char *devname,
dbg("opening %s\n", devname);
fd = open(devname, O_RDONLY | O_NONBLOCK);
if (fd < 0) {
- info("%s: cannot open %s: %s",
+ info("%s: cannot open %s: %s\n",
dev_scsi->kernel, devname, strerror(errno));
return 1;
}
@@ -762,7 +762,7 @@ int scsi_std_inquiry(struct sysfs_device *dev_scsi, const char *devname,
sprintf(type,"%x", buf[0] & 0x1f);
if (close(fd) < 0)
- info("%s: close failed: %s", dev_scsi->kernel, strerror(errno));
+ info("%s: close failed: %s\n", dev_scsi->kernel, strerror(errno));
return 0;
}
@@ -779,7 +779,7 @@ int scsi_get_serial (struct sysfs_device *dev_scsi, const char *devname,
dbg("opening %s\n", devname);
fd = open(devname, O_RDONLY | O_NONBLOCK);
if (fd < 0) {
- info("%s: cannot open %s: %s",
+ info("%s: cannot open %s: %s\n",
dev_scsi->kernel, devname, strerror(errno));
return 1;
}
@@ -826,7 +826,7 @@ int scsi_get_serial (struct sysfs_device *dev_scsi, const char *devname,
goto completed;
}
} else if (page_code != 0x00) {
- info("%s: unsupported page code 0x%d", dev_scsi->kernel, page_code);
+ info("%s: unsupported page code 0x%d\n", dev_scsi->kernel, page_code);
return 1;
}
@@ -870,6 +870,6 @@ int scsi_get_serial (struct sysfs_device *dev_scsi, const char *devname,
retval = 1;
completed:
if (close(fd) < 0)
- info("%s: close failed: %s", dev_scsi->kernel, strerror(errno));
+ info("%s: close failed: %s\n", dev_scsi->kernel, strerror(errno));
return retval;
}
diff --git a/extras/usb_id/usb_id.c b/extras/usb_id/usb_id.c
index 5fb030db56..fed6631b90 100644
--- a/extras/usb_id/usb_id.c
+++ b/extras/usb_id/usb_id.c
@@ -231,20 +231,20 @@ static int usb_id(const char *devpath)
/* get all usb specific information: dev_interface, if_class, dev_usb */
dev = sysfs_device_get(devpath);
if (dev == NULL) {
- err("unable to access '%s'", devpath);
+ err("unable to access '%s'\n", devpath);
return 1;
}
/* usb interface directory */
dev_interface = sysfs_device_get_parent_with_subsystem(dev, "usb");
if (dev_interface == NULL) {
- info("unable to access usb_interface device of '%s'", devpath);
+ info("unable to access usb_interface device of '%s'\n", devpath);
return 1;
}
if_class = sysfs_attr_get_value(dev_interface->devpath, "bInterfaceClass");
if (!if_class) {
- info("%s: cannot get bInterfaceClass attribute", dev_interface->kernel);
+ info("%s: cannot get bInterfaceClass attribute\n", dev_interface->kernel);
return 1;
}
if_class_num = strtoul(if_class, NULL, 16);
@@ -260,7 +260,7 @@ static int usb_id(const char *devpath)
/* usb device directory */
dev_usb = sysfs_device_get_parent_with_subsystem(dev_interface, "usb");
if (!dev_usb) {
- info("unable to find parent 'usb' device of '%s'", devpath);
+ info("unable to find parent 'usb' device of '%s'\n", devpath);
return 1;
}
@@ -273,39 +273,39 @@ static int usb_id(const char *devpath)
/* get scsi device */
dev_scsi = sysfs_device_get_parent_with_subsystem(dev, "scsi");
if (dev_scsi == NULL) {
- info("unable to find parent 'scsi' device of '%s'", devpath);
+ info("unable to find parent 'scsi' device of '%s'\n", devpath);
goto fallback;
}
if (sscanf(dev_scsi->kernel, "%d:%d:%d:%d", &host, &bus, &target, &lun) != 4) {
- info("invalid scsi device '%s'", dev_scsi->kernel);
+ info("invalid scsi device '%s'\n", dev_scsi->kernel);
goto fallback;
}
/* Generic SPC-2 device */
scsi_vendor = sysfs_attr_get_value(dev_scsi->devpath, "vendor");
if (!scsi_vendor) {
- info("%s: cannot get SCSI vendor attribute", dev_scsi->kernel);
+ info("%s: cannot get SCSI vendor attribute\n", dev_scsi->kernel);
goto fallback;
}
set_str(vendor_str, scsi_vendor, sizeof(vendor_str)-1);
scsi_model = sysfs_attr_get_value(dev_scsi->devpath, "model");
if (!scsi_model) {
- info("%s: cannot get SCSI model attribute", dev_scsi->kernel);
+ info("%s: cannot get SCSI model attribute\n", dev_scsi->kernel);
goto fallback;
}
set_str(model_str, scsi_model, sizeof(model_str)-1);
scsi_type = sysfs_attr_get_value(dev_scsi->devpath, "type");
if (!scsi_type) {
- info("%s: cannot get SCSI type attribute", dev_scsi->kernel);
+ info("%s: cannot get SCSI type attribute\n", dev_scsi->kernel);
goto fallback;
}
set_scsi_type(type_str, scsi_type, sizeof(type_str)-1);
scsi_rev = sysfs_attr_get_value(dev_scsi->devpath, "rev");
if (!scsi_rev) {
- info("%s: cannot get SCSI revision attribute", dev_scsi->kernel);
+ info("%s: cannot get SCSI revision attribute\n", dev_scsi->kernel);
goto fallback;
}
set_str(revision_str, scsi_rev, sizeof(revision_str)-1);
@@ -329,7 +329,7 @@ fallback:
usb_vendor = sysfs_attr_get_value(dev_usb->devpath, "idVendor");
if (!usb_vendor) {
- info("No USB vendor information available");
+ info("No USB vendor information available\n");
return 1;
}
set_str(vendor_str, usb_vendor, sizeof(vendor_str)-1);
@@ -345,7 +345,7 @@ fallback:
usb_model = sysfs_attr_get_value(dev_usb->devpath, "idProduct");
if (!usb_model) {
- dbg("No USB model information available");
+ dbg("No USB model information available\n");
return 1;
}
set_str(model_str, usb_model, sizeof(model_str)-1);
diff --git a/extras/volume_id/lib/adaptec_raid.c b/extras/volume_id/lib/adaptec_raid.c
index 858c3ba09e..5ab9451890 100644
--- a/extras/volume_id/lib/adaptec_raid.c
+++ b/extras/volume_id/lib/adaptec_raid.c
@@ -86,7 +86,7 @@ int volume_id_probe_adaptec_raid(struct volume_id *id, uint64_t off, uint64_t si
uint64_t meta_off;
struct adaptec_meta *ad;
- info("probing at offset 0x%llx, size 0x%llx",
+ info("probing at offset 0x%llx, size 0x%llx\n",
(unsigned long long) off, (unsigned long long) size);
if (size < 0x10000)
diff --git a/extras/volume_id/lib/cramfs.c b/extras/volume_id/lib/cramfs.c
index bf329506e1..9c7eaf6177 100644
--- a/extras/volume_id/lib/cramfs.c
+++ b/extras/volume_id/lib/cramfs.c
@@ -45,7 +45,7 @@ int volume_id_probe_cramfs(struct volume_id *id, uint64_t off, uint64_t size)
{
struct cramfs_super *cs;
- info("probing at offset 0x%llx", (unsigned long long) off);
+ info("probing at offset 0x%llx\n", (unsigned long long) off);
cs = (struct cramfs_super *) volume_id_get_buffer(id, off, 0x200);
if (cs == NULL)
diff --git a/extras/volume_id/lib/ddf_raid.c b/extras/volume_id/lib/ddf_raid.c
index 560e6bd603..60837a48b1 100644
--- a/extras/volume_id/lib/ddf_raid.c
+++ b/extras/volume_id/lib/ddf_raid.c
@@ -45,7 +45,7 @@ int volume_id_probe_ddf_raid(struct volume_id *id, uint64_t off, uint64_t size)
uint64_t ddf_off = ((size / 0x200)-1) * 0x200;
const uint8_t *buf;
- info("probing at offset 0x%llx, size 0x%llx",
+ info("probing at offset 0x%llx, size 0x%llx\n",
(unsigned long long) off, (unsigned long long) size);
if (size < 0x10000)
return -1;
diff --git a/extras/volume_id/lib/ext.c b/extras/volume_id/lib/ext.c
index ac21f12501..56edd2531f 100644
--- a/extras/volume_id/lib/ext.c
+++ b/extras/volume_id/lib/ext.c
@@ -132,7 +132,7 @@ int volume_id_probe_ext(struct volume_id *id, uint64_t off, uint64_t size)
uint32_t feature_incompat;
uint32_t flags;
- info("probing at offset 0x%llx", (unsigned long long) off);
+ info("probing at offset 0x%llx\n", (unsigned long long) off);
es = (struct ext2_super_block *) volume_id_get_buffer(id, off + EXT_SUPERBLOCK_OFFSET, 0x200);
if (es == NULL)
@@ -142,9 +142,9 @@ int volume_id_probe_ext(struct volume_id *id, uint64_t off, uint64_t size)
return -1;
bsize = 0x400 << le32_to_cpu(es->s_log_block_size);
- dbg("ext blocksize 0x%zx", bsize);
+ dbg("ext blocksize 0x%zx\n", bsize);
if (bsize < EXT3_MIN_BLOCK_SIZE || bsize > EXT3_MAX_BLOCK_SIZE) {
- dbg("invalid ext blocksize");
+ dbg("invalid ext blocksize\n");
return -1;
}
diff --git a/extras/volume_id/lib/fat.c b/extras/volume_id/lib/fat.c
index 3ddf0258eb..58f8f825c4 100644
--- a/extras/volume_id/lib/fat.c
+++ b/extras/volume_id/lib/fat.c
@@ -217,7 +217,7 @@ static size_t get_fat_attr_volume_id(uint8_t *filename, size_t fnsize,
for (i = 0; i < count; i++) {
/* end marker */
if (dir[i].name[0] == 0x00) {
- dbg("end of dir");
+ dbg("end of dir\n");
break;
}
@@ -234,11 +234,11 @@ static size_t get_fat_attr_volume_id(uint8_t *filename, size_t fnsize,
if (dir[i].cluster_high != 0 || dir[i].cluster_low != 0)
continue;
- dbg("found ATTR_VOLUME_ID id in root dir");
+ dbg("found ATTR_VOLUME_ID id in root dir\n");
return fat_read_filename(filename, fnsize, dir, &dir[i]);
}
- dbg("skip dir entry");
+ dbg("skip dir entry\n");
}
return 0;
@@ -270,7 +270,7 @@ int volume_id_probe_vfat(struct volume_id *id, uint64_t off, uint64_t size)
int maxloop;
size_t fnlen;
- info("probing at offset 0x%llx", (unsigned long long) off);
+ info("probing at offset 0x%llx\n", (unsigned long long) off);
buf = volume_id_get_buffer(id, off, 0x400);
if (buf == NULL)
@@ -328,22 +328,22 @@ magic:
if (sector_size == 0 || ((sector_size & (sector_size-1)) != 0))
return -1;
- dbg("sector_size 0x%x", sector_size);
- dbg("sectors_per_cluster 0x%x", vs->sectors_per_cluster);
+ dbg("sector_size 0x%x\n", sector_size);
+ dbg("sectors_per_cluster 0x%x\n", vs->sectors_per_cluster);
dir_entries = le16_to_cpu(vs->dir_entries);
reserved = le16_to_cpu(vs->reserved);
- dbg("reserved 0x%x", reserved);
+ dbg("reserved 0x%x\n", reserved);
sect_count = le16_to_cpu(vs->sectors);
if (sect_count == 0)
sect_count = le32_to_cpu(vs->total_sect);
- dbg("sect_count 0x%x", sect_count);
+ dbg("sect_count 0x%x\n", sect_count);
fat_length = le16_to_cpu(vs->fat_length);
- dbg("fat_length 0x%x", fat_length);
+ dbg("fat_length 0x%x\n", fat_length);
fat32_length = le32_to_cpu(vs->type.fat32.fat32_length);
- dbg("fat32_length 0x%x", fat32_length);
+ dbg("fat32_length 0x%x\n", fat32_length);
if (fat_length)
fat_size = fat_length * vs->fats;
@@ -351,15 +351,15 @@ magic:
fat_size = fat32_length * vs->fats;
else
return -1;
- dbg("fat_size 0x%x", fat_size);
+ dbg("fat_size 0x%x\n", fat_size);
dir_size = ((dir_entries * sizeof(struct vfat_dir_entry)) +
(sector_size-1)) / sector_size;
- dbg("dir_size 0x%x", dir_size);
+ dbg("dir_size 0x%x\n", dir_size);
cluster_count = sect_count - (reserved + fat_size + dir_size);
cluster_count /= vs->sectors_per_cluster;
- dbg("cluster_count 0x%x", cluster_count);
+ dbg("cluster_count 0x%x\n", cluster_count);
/* must be FAT32 */
if (!fat_length && fat32_length)
@@ -375,9 +375,9 @@ magic:
/* the label may be an attribute in the root directory */
root_start = (reserved + fat_size) * sector_size;
- dbg("root dir start 0x%llx", (unsigned long long) root_start);
+ dbg("root dir start 0x%llx\n", (unsigned long long) root_start);
root_dir_entries = le16_to_cpu(vs->dir_entries);
- dbg("expected entries 0x%x", root_dir_entries);
+ dbg("expected entries 0x%x\n", root_dir_entries);
buf_size = root_dir_entries * sizeof(struct vfat_dir_entry);
buf = volume_id_get_buffer(id, off + root_start, buf_size);
@@ -423,7 +423,7 @@ fat32:
/* FAT32 root dir is a cluster chain like any other directory */
buf_size = vs->sectors_per_cluster * sector_size;
root_cluster = le32_to_cpu(vs->type.fat32.root_cluster);
- dbg("root dir cluster %u", root_cluster);
+ dbg("root dir cluster %u\n", root_cluster);
start_data_sect = reserved + fat_size;
next = root_cluster;
@@ -434,10 +434,10 @@ fat32:
uint64_t fat_entry_off;
int count;
- dbg("next cluster %u", next);
+ dbg("next cluster %u\n", next);
next_sect_off = (next - 2) * vs->sectors_per_cluster;
next_off = (start_data_sect + next_sect_off) * sector_size;
- dbg("cluster offset 0x%llx", (unsigned long long) next_off);
+ dbg("cluster offset 0x%llx\n", (unsigned long long) next_off);
/* get cluster */
buf = volume_id_get_buffer(id, off + next_off, buf_size);
@@ -446,7 +446,7 @@ fat32:
dir = (struct vfat_dir_entry*) buf;
count = buf_size / sizeof(struct vfat_dir_entry);
- dbg("expected entries 0x%x", count);
+ dbg("expected entries 0x%x\n", count);
fnlen = get_fat_attr_volume_id(filename, sizeof(filename), dir, count);
if (fnlen > 0)
@@ -464,7 +464,7 @@ fat32:
break;
}
if (maxloop == 0)
- dbg("reached maximum follow count of root cluster chain, give up");
+ dbg("reached maximum follow count of root cluster chain, give up\n");
vs = (struct vfat_super_block *) volume_id_get_buffer(id, off, 0x200);
if (vs == NULL)
diff --git a/extras/volume_id/lib/gfs.c b/extras/volume_id/lib/gfs.c
index 1d3a4a0f1e..53382222ac 100644
--- a/extras/volume_id/lib/gfs.c
+++ b/extras/volume_id/lib/gfs.c
@@ -78,7 +78,7 @@ static int volume_id_probe_gfs_generic(struct volume_id *id, uint64_t off, int v
{
struct gfs2_sb *sbd;
- info("probing at offset 0x%llx", (unsigned long long) off);
+ info("probing at offset 0x%llx\n", (unsigned long long) off);
sbd = (struct gfs2_sb *)
volume_id_get_buffer(id, off + GFS_SUPERBLOCK_OFFSET, sizeof(struct gfs2_sb));
diff --git a/extras/volume_id/lib/hfs.c b/extras/volume_id/lib/hfs.c
index 70a6b4ae2c..b6d7e0290b 100644
--- a/extras/volume_id/lib/hfs.c
+++ b/extras/volume_id/lib/hfs.c
@@ -186,7 +186,7 @@ int volume_id_probe_hfs_hfsplus(struct volume_id *id, uint64_t off, uint64_t siz
struct hfsplus_extent extents[HFSPLUS_EXTENT_COUNT];
const uint8_t *buf;
- info("probing at offset 0x%llx", (unsigned long long) off);
+ info("probing at offset 0x%llx\n", (unsigned long long) off);
buf = volume_id_get_buffer(id, off + HFS_SUPERBLOCK_OFFSET, 0x200);
if (buf == NULL)
@@ -199,17 +199,17 @@ int volume_id_probe_hfs_hfsplus(struct volume_id *id, uint64_t off, uint64_t siz
/* it may be just a hfs wrapper for hfs+ */
if (memcmp(hfs->embed_sig, "H+", 2) == 0) {
alloc_block_size = be32_to_cpu(hfs->al_blk_size);
- dbg("alloc_block_size 0x%x", alloc_block_size);
+ dbg("alloc_block_size 0x%x\n", alloc_block_size);
alloc_first_block = be16_to_cpu(hfs->al_bl_st);
- dbg("alloc_first_block 0x%x", alloc_first_block);
+ dbg("alloc_first_block 0x%x\n", alloc_first_block);
embed_first_block = be16_to_cpu(hfs->embed_startblock);
- dbg("embed_first_block 0x%x", embed_first_block);
+ dbg("embed_first_block 0x%x\n", embed_first_block);
off += (alloc_first_block * 512) +
(embed_first_block * alloc_block_size);
- dbg("hfs wrapped hfs+ found at offset 0x%llx", (unsigned long long) off);
+ dbg("hfs wrapped hfs+ found at offset 0x%llx\n", (unsigned long long) off);
buf = volume_id_get_buffer(id, off + HFS_SUPERBLOCK_OFFSET, 0x200);
if (buf == NULL)
@@ -241,11 +241,11 @@ hfsplus:
hfsid_set_uuid(id, hfsplus->finder_info.id);
blocksize = be32_to_cpu(hfsplus->blocksize);
- dbg("blocksize %u", blocksize);
+ dbg("blocksize %u\n", blocksize);
memcpy(extents, hfsplus->cat_file.extents, sizeof(extents));
cat_block = be32_to_cpu(extents[0].start_block);
- dbg("catalog start block 0x%x", cat_block);
+ dbg("catalog start block 0x%x\n", cat_block);
buf = volume_id_get_buffer(id, off + (cat_block * blocksize), 0x2000);
if (buf == NULL)
@@ -255,13 +255,13 @@ hfsplus:
&buf[sizeof(struct hfsplus_bnode_descriptor)];
leaf_node_head = be32_to_cpu(bnode->leaf_head);
- dbg("catalog leaf node 0x%x", leaf_node_head);
+ dbg("catalog leaf node 0x%x\n", leaf_node_head);
leaf_node_size = be16_to_cpu(bnode->node_size);
- dbg("leaf node size 0x%x", leaf_node_size);
+ dbg("leaf node size 0x%x\n", leaf_node_size);
leaf_node_count = be32_to_cpu(bnode->leaf_count);
- dbg("leaf node count 0x%x", leaf_node_count);
+ dbg("leaf node count 0x%x\n", leaf_node_count);
if (leaf_node_count == 0)
goto found;
@@ -271,7 +271,7 @@ hfsplus:
for (ext = 0; ext < HFSPLUS_EXTENT_COUNT; ext++) {
ext_block_start = be32_to_cpu(extents[ext].start_block);
ext_block_count = be32_to_cpu(extents[ext].block_count);
- dbg("extent start block 0x%x, count 0x%x", ext_block_start, ext_block_count);
+ dbg("extent start block 0x%x, count 0x%x\n", ext_block_start, ext_block_count);
if (ext_block_count == 0)
goto found;
@@ -284,7 +284,7 @@ hfsplus:
}
if (ext == HFSPLUS_EXTENT_COUNT)
goto found;
- dbg("found block in extent %i", ext);
+ dbg("found block in extent %i\n", ext);
leaf_off = (ext_block_start + leaf_block) * blocksize;
@@ -293,10 +293,10 @@ hfsplus:
goto found;
descr = (struct hfsplus_bnode_descriptor *) buf;
- dbg("descriptor type 0x%x", descr->type);
+ dbg("descriptor type 0x%x\n", descr->type);
record_count = be16_to_cpu(descr->num_recs);
- dbg("number of records %u", record_count);
+ dbg("number of records %u\n", record_count);
if (record_count == 0)
goto found;
@@ -306,12 +306,12 @@ hfsplus:
key = (struct hfsplus_catalog_key *)
&buf[sizeof(struct hfsplus_bnode_descriptor)];
- dbg("parent id 0x%x", be32_to_cpu(key->parent_id));
+ dbg("parent id 0x%x\n", be32_to_cpu(key->parent_id));
if (be32_to_cpu(key->parent_id) != HFSPLUS_POR_CNID)
goto found;
label_len = be16_to_cpu(key->unicode_len) * 2;
- dbg("label unicode16 len %i", label_len);
+ dbg("label unicode16 len %i\n", label_len);
volume_id_set_label_raw(id, key->unicode, label_len);
volume_id_set_label_unicode16(id, key->unicode, BE, label_len);
diff --git a/extras/volume_id/lib/highpoint.c b/extras/volume_id/lib/highpoint.c
index f2c4069cc6..0629015117 100644
--- a/extras/volume_id/lib/highpoint.c
+++ b/extras/volume_id/lib/highpoint.c
@@ -49,7 +49,7 @@ int volume_id_probe_highpoint_37x_raid(struct volume_id *id, uint64_t off, uint6
struct hpt37x_meta *hpt;
uint32_t magic;
- info("probing at offset 0x%llx", (unsigned long long) off);
+ info("probing at offset 0x%llx\n", (unsigned long long) off);
buf = volume_id_get_buffer(id, off + HPT37X_CONFIG_OFF, 0x200);
if (buf == NULL)
@@ -73,7 +73,7 @@ int volume_id_probe_highpoint_45x_raid(struct volume_id *id, uint64_t off, uint6
uint64_t meta_off;
uint32_t magic;
- dbg("probing at offset 0x%llx, size 0x%llx",
+ dbg("probing at offset 0x%llx, size 0x%llx\n",
(unsigned long long) off, (unsigned long long) size);
if (size < 0x10000)
diff --git a/extras/volume_id/lib/hpfs.c b/extras/volume_id/lib/hpfs.c
index edcf0666ae..ac5a35437a 100644
--- a/extras/volume_id/lib/hpfs.c
+++ b/extras/volume_id/lib/hpfs.c
@@ -38,7 +38,7 @@ int volume_id_probe_hpfs(struct volume_id *id, uint64_t off, uint64_t size)
{
struct hpfs_super *hs;
- info("probing at offset 0x%llx", (unsigned long long) off);
+ info("probing at offset 0x%llx\n", (unsigned long long) off);
hs = (struct hpfs_super *) volume_id_get_buffer(id, off + HPFS_SUPERBLOCK_OFFSET, 0x200);
if (hs == NULL)
diff --git a/extras/volume_id/lib/iso9660.c b/extras/volume_id/lib/iso9660.c
index 1d8bdff878..0e2c686fa2 100644
--- a/extras/volume_id/lib/iso9660.c
+++ b/extras/volume_id/lib/iso9660.c
@@ -59,7 +59,7 @@ int volume_id_probe_iso9660(struct volume_id *id, uint64_t off, uint64_t size)
struct iso_volume_descriptor *is;
struct high_sierra_volume_descriptor *hs;
- info("probing at offset 0x%llx", (unsigned long long) off);
+ info("probing at offset 0x%llx\n", (unsigned long long) off);
buf = volume_id_get_buffer(id, off + ISO_SUPERBLOCK_OFFSET, 0x200);
if (buf == NULL)
@@ -71,11 +71,11 @@ int volume_id_probe_iso9660(struct volume_id *id, uint64_t off, uint64_t size)
int vd_offset;
int i;
- dbg("read label from PVD");
+ dbg("read label from PVD\n");
volume_id_set_label_raw(id, is->volume_id, 32);
volume_id_set_label_string(id, is->volume_id, 32);
- dbg("looking for SVDs");
+ dbg("looking for SVDs\n");
vd_offset = ISO_VD_OFFSET;
for (i = 0; i < ISO_VD_MAX; i++) {
uint8_t svd_label[64];
@@ -86,14 +86,14 @@ int volume_id_probe_iso9660(struct volume_id *id, uint64_t off, uint64_t size)
if (is->type != ISO_VD_SUPPLEMENTARY)
continue;
- dbg("found SVD at offset 0x%llx", (unsigned long long) (off + vd_offset));
+ dbg("found SVD at offset 0x%llx\n", (unsigned long long) (off + vd_offset));
if (memcmp(is->escape_sequences, "%/@", 3) == 0||
memcmp(is->escape_sequences, "%/C", 3) == 0||
memcmp(is->escape_sequences, "%/E", 3) == 0) {
- dbg("Joliet extension found");
+ dbg("Joliet extension found\n");
volume_id_set_unicode16(svd_label, sizeof(svd_label), is->volume_id, BE, 32);
if (memcmp(id->label, svd_label, 16) == 0) {
- dbg("SVD label is identical, use the possibly longer PVD one");
+ dbg("SVD label is identical, use the possibly longer PVD one\n");
break;
}
diff --git a/extras/volume_id/lib/isw_raid.c b/extras/volume_id/lib/isw_raid.c
index f5761e826b..337a9cecbd 100644
--- a/extras/volume_id/lib/isw_raid.c
+++ b/extras/volume_id/lib/isw_raid.c
@@ -43,7 +43,7 @@ int volume_id_probe_intel_software_raid(struct volume_id *id, uint64_t off, uint
uint64_t meta_off;
struct isw_meta *isw;
- info("probing at offset 0x%llx, size 0x%llx",
+ info("probing at offset 0x%llx, size 0x%llx\n",
(unsigned long long) off, (unsigned long long) size);
if (size < 0x10000)
diff --git a/extras/volume_id/lib/jfs.c b/extras/volume_id/lib/jfs.c
index 00b66cccc7..950ba43e1c 100644
--- a/extras/volume_id/lib/jfs.c
+++ b/extras/volume_id/lib/jfs.c
@@ -45,7 +45,7 @@ int volume_id_probe_jfs(struct volume_id *id, uint64_t off, uint64_t size)
{
struct jfs_super_block *js;
- info("probing at offset 0x%llx", (unsigned long long) off);
+ info("probing at offset 0x%llx\n", (unsigned long long) off);
js = (struct jfs_super_block *) volume_id_get_buffer(id, off + JFS_SUPERBLOCK_OFFSET, 0x200);
if (js == NULL)
diff --git a/extras/volume_id/lib/jmicron_raid.c b/extras/volume_id/lib/jmicron_raid.c
index 5182a3e825..6cb1f6f315 100644
--- a/extras/volume_id/lib/jmicron_raid.c
+++ b/extras/volume_id/lib/jmicron_raid.c
@@ -39,7 +39,7 @@ int volume_id_probe_jmicron_raid(struct volume_id *id, uint64_t off, uint64_t si
uint64_t meta_off;
struct jmicron_meta *jm;
- info("probing at offset 0x%llx, size 0x%llx",
+ info("probing at offset 0x%llx, size 0x%llx\n",
(unsigned long long) off, (unsigned long long) size);
if (size < 0x10000)
diff --git a/extras/volume_id/lib/linux_raid.c b/extras/volume_id/lib/linux_raid.c
index 5e0c4a494f..96ae7c32e3 100644
--- a/extras/volume_id/lib/linux_raid.c
+++ b/extras/volume_id/lib/linux_raid.c
@@ -66,7 +66,7 @@ static int volume_id_probe_linux_raid0(struct volume_id *id, uint64_t off, uint6
uint8_t bytes[16];
} uuid;
- info("probing at offset 0x%llx, size 0x%llx",
+ info("probing at offset 0x%llx, size 0x%llx\n",
(unsigned long long) off, (unsigned long long) size);
if (size < 0x10000)
return -1;
@@ -120,7 +120,7 @@ static int volume_id_probe_linux_raid1(struct volume_id *id, uint64_t off, uint6
{
const uint8_t *buf;
- info("probing at offset 0x%llx, size 0x%llx",
+ info("probing at offset 0x%llx, size 0x%llx\n",
(unsigned long long) off, (unsigned long long) size);
buf = volume_id_get_buffer(id, off, 0x800);
diff --git a/extras/volume_id/lib/linux_swap.c b/extras/volume_id/lib/linux_swap.c
index 50d43ccce6..9ff16e2798 100644
--- a/extras/volume_id/lib/linux_swap.c
+++ b/extras/volume_id/lib/linux_swap.c
@@ -43,7 +43,7 @@ int volume_id_probe_linux_swap(struct volume_id *id, uint64_t off, uint64_t size
unsigned int page;
struct swap_header_v1_2 *sw;
- info("probing at offset 0x%llx", (unsigned long long) off);
+ info("probing at offset 0x%llx\n", (unsigned long long) off);
/* eek, the swap signature is at the end of the PAGE_SIZE */
for (page = 0x1000; page <= LARGEST_PAGESIZE; page <<= 1) {
diff --git a/extras/volume_id/lib/lsi_raid.c b/extras/volume_id/lib/lsi_raid.c
index 56fd5671d3..eef87142b8 100644
--- a/extras/volume_id/lib/lsi_raid.c
+++ b/extras/volume_id/lib/lsi_raid.c
@@ -38,7 +38,7 @@ int volume_id_probe_lsi_mega_raid(struct volume_id *id, uint64_t off, uint64_t s
uint64_t meta_off;
struct lsi_meta *lsi;
- info("probing at offset 0x%llx, size 0x%llx",
+ info("probing at offset 0x%llx, size 0x%llx\n",
(unsigned long long) off, (unsigned long long) size);
if (size < 0x10000)
diff --git a/extras/volume_id/lib/lvm.c b/extras/volume_id/lib/lvm.c
index 7c4f81131c..d234113d77 100644
--- a/extras/volume_id/lib/lvm.c
+++ b/extras/volume_id/lib/lvm.c
@@ -51,7 +51,7 @@ int volume_id_probe_lvm1(struct volume_id *id, uint64_t off, uint64_t size)
const uint8_t *buf;
struct lvm1_super_block *lvm;
- info("probing at offset 0x%llx", (unsigned long long) off);
+ info("probing at offset 0x%llx\n", (unsigned long long) off);
buf = volume_id_get_buffer(id, off + LVM1_SB_OFF, 0x800);
if (buf == NULL)
@@ -78,7 +78,7 @@ int volume_id_probe_lvm2(struct volume_id *id, uint64_t off, uint64_t size)
struct lvm2_super_block *lvm;
struct lvm2_pv_header *pvhdr;
- dbg("probing at offset 0x%llx", (unsigned long long) off);
+ dbg("probing at offset 0x%llx\n", (unsigned long long) off);
buf = volume_id_get_buffer(id, off, LVM2LABEL_SCAN_SECTORS * 0x200);
if (buf == NULL)
@@ -95,7 +95,7 @@ int volume_id_probe_lvm2(struct volume_id *id, uint64_t off, uint64_t size)
return -1;
found:
- dbg("found at offset 0x%x (pv hdr offset 0x%x)",
+ dbg("found at offset 0x%x (pv hdr offset 0x%x)\n",
soff, cpu_to_le32(lvm->offset_xl));
soff += cpu_to_le32(lvm->offset_xl);
pvhdr = (struct lvm2_pv_header *) &buf[soff];
diff --git a/extras/volume_id/lib/minix.c b/extras/volume_id/lib/minix.c
index 64945067e8..88b4c189c4 100644
--- a/extras/volume_id/lib/minix.c
+++ b/extras/volume_id/lib/minix.c
@@ -70,7 +70,7 @@ int volume_id_probe_minix(struct volume_id *id, uint64_t off, uint64_t size)
struct minix_super_block *ms;
struct minix3_super_block *m3s;
- info("probing at offset 0x%llx", (unsigned long long) off);
+ info("probing at offset 0x%llx\n", (unsigned long long) off);
buf = volume_id_get_buffer(id, off + MINIX_SUPERBLOCK_OFFSET, 0x200);
if (buf == NULL)
diff --git a/extras/volume_id/lib/netware.c b/extras/volume_id/lib/netware.c
index 4d157aaf5d..c03455791c 100644
--- a/extras/volume_id/lib/netware.c
+++ b/extras/volume_id/lib/netware.c
@@ -82,7 +82,7 @@ int volume_id_probe_netware(struct volume_id *id, uint64_t off, uint64_t size)
{
struct netware_super_block *nw;
- info("probing at offset 0x%llx", (unsigned long long) off);
+ info("probing at offset 0x%llx\n", (unsigned long long) off);
nw = (struct netware_super_block *) volume_id_get_buffer(id, off + NW_SUPERBLOCK_OFFSET, 0x200);
if (nw == NULL)
diff --git a/extras/volume_id/lib/ntfs.c b/extras/volume_id/lib/ntfs.c
index f63804d711..1e73bc8f15 100644
--- a/extras/volume_id/lib/ntfs.c
+++ b/extras/volume_id/lib/ntfs.c
@@ -105,7 +105,7 @@ int volume_id_probe_ntfs(struct volume_id *id, uint64_t off, uint64_t size)
const uint8_t *buf;
const uint8_t *val;
- info("probing at offset 0x%llx", (unsigned long long) off);
+ info("probing at offset 0x%llx\n", (unsigned long long) off);
ns = (struct ntfs_super_block *) volume_id_get_buffer(id, off, 0x200);
if (ns == NULL)
@@ -130,12 +130,12 @@ int volume_id_probe_ntfs(struct volume_id *id, uint64_t off, uint64_t size)
else
mft_record_size = ns->cluster_per_mft_record * cluster_size;
- dbg("sectorsize 0x%x", sector_size);
- dbg("clustersize 0x%x", cluster_size);
- dbg("mftcluster %llu", (unsigned long long) mft_cluster);
- dbg("mftoffset 0x%llx", (unsigned long long) mft_off);
- dbg("cluster per mft_record %i", ns->cluster_per_mft_record);
- dbg("mft record size %i", mft_record_size);
+ dbg("sectorsize 0x%x\n", sector_size);
+ dbg("clustersize 0x%x\n", cluster_size);
+ dbg("mftcluster %llu\n", (unsigned long long) mft_cluster);
+ dbg("mftoffset 0x%llx\n", (unsigned long long) mft_off);
+ dbg("cluster per mft_record %i\n", ns->cluster_per_mft_record);
+ dbg("mft record size %i\n", mft_record_size);
buf = volume_id_get_buffer(id, off + mft_off + (MFT_RECORD_VOLUME * mft_record_size),
mft_record_size);
@@ -143,12 +143,12 @@ int volume_id_probe_ntfs(struct volume_id *id, uint64_t off, uint64_t size)
return -1;
mftr = (struct master_file_table_record*) buf;
- dbg("mftr->magic '%c%c%c%c'", mftr->magic[0], mftr->magic[1], mftr->magic[2], mftr->magic[3]);
+ dbg("mftr->magic '%c%c%c%c'\n", mftr->magic[0], mftr->magic[1], mftr->magic[2], mftr->magic[3]);
if (memcmp(mftr->magic, "FILE", 4) != 0)
return -1;
attr_off = le16_to_cpu(mftr->attrs_offset);
- dbg("file $Volume's attributes are at offset %i", attr_off);
+ dbg("file $Volume's attributes are at offset %i\n", attr_off);
while (1) {
attr = (struct file_attribute*) &buf[attr_off];
@@ -167,18 +167,18 @@ int volume_id_probe_ntfs(struct volume_id *id, uint64_t off, uint64_t size)
if (attr_type == MFT_RECORD_ATTR_END)
break;
- dbg("found attribute type 0x%x, len %i, at offset %i",
+ dbg("found attribute type 0x%x, len %i, at offset %i\n",
attr_type, attr_len, attr_off);
if (attr_type == MFT_RECORD_ATTR_VOLUME_INFO) {
- dbg("found info, len %i", val_len);
+ dbg("found info, len %i\n", val_len);
info = (struct volume_info*) (((uint8_t *) attr) + val_off);
snprintf(id->type_version, sizeof(id->type_version)-1,
"%u.%u", info->major_ver, info->minor_ver);
}
if (attr_type == MFT_RECORD_ATTR_VOLUME_NAME) {
- dbg("found label, len %i", val_len);
+ dbg("found label, len %i\n", val_len);
if (val_len > VOLUME_ID_LABEL_SIZE)
val_len = VOLUME_ID_LABEL_SIZE;
diff --git a/extras/volume_id/lib/nvidia_raid.c b/extras/volume_id/lib/nvidia_raid.c
index ca42459307..c6b5185399 100644
--- a/extras/volume_id/lib/nvidia_raid.c
+++ b/extras/volume_id/lib/nvidia_raid.c
@@ -41,7 +41,7 @@ int volume_id_probe_nvidia_raid(struct volume_id *id, uint64_t off, uint64_t siz
uint64_t meta_off;
struct nvidia_meta *nv;
- info("probing at offset 0x%llx, size 0x%llx",
+ info("probing at offset 0x%llx, size 0x%llx\n",
(unsigned long long) off, (unsigned long long) size);
if (size < 0x10000)
diff --git a/extras/volume_id/lib/ocfs.c b/extras/volume_id/lib/ocfs.c
index 9f251f1794..ec81f5e8e3 100644
--- a/extras/volume_id/lib/ocfs.c
+++ b/extras/volume_id/lib/ocfs.c
@@ -132,7 +132,7 @@ int volume_id_probe_ocfs1(struct volume_id *id, uint64_t off, uint64_t size)
struct ocfs1_super_block_header *osh;
struct ocfs1_super_block_label *osl;
- info("probing at offset 0x%llx", (unsigned long long) off);
+ info("probing at offset 0x%llx\n", (unsigned long long) off);
buf = volume_id_get_buffer(id, off, 0x200);
if (buf == NULL)
@@ -144,7 +144,7 @@ int volume_id_probe_ocfs1(struct volume_id *id, uint64_t off, uint64_t size)
snprintf(id->type_version, sizeof(id->type_version)-1,
"%u.%u", osh->major_version, osh->minor_version);
- dbg("found OracleCFS signature, now reading label");
+ dbg("found OracleCFS signature, now reading label\n");
buf = volume_id_get_buffer(id, off + 0x200, 0x200);
if (buf == NULL)
return -1;
@@ -170,7 +170,7 @@ int volume_id_probe_ocfs2(struct volume_id *id, uint64_t off, uint64_t size)
struct ocfs2_super_block *os;
size_t blksize;
- info("probing at offset 0x%llx", (unsigned long long) off);
+ info("probing at offset 0x%llx\n", (unsigned long long) off);
for (blksize = 0x200; blksize <= OCFS2_MAX_BLOCKSIZE; blksize <<= 1) {
buf = volume_id_get_buffer(id, off + OCFS2_SUPER_BLOCK_BLKNO * blksize, 0x200);
diff --git a/extras/volume_id/lib/promise_raid.c b/extras/volume_id/lib/promise_raid.c
index 1c4d3658ce..ecaed00986 100644
--- a/extras/volume_id/lib/promise_raid.c
+++ b/extras/volume_id/lib/promise_raid.c
@@ -42,7 +42,7 @@ int volume_id_probe_promise_fasttrack_raid(struct volume_id *id, uint64_t off, u
63, 255, 256, 16, 399, 0
};
- info("probing at offset 0x%llx, size 0x%llx",
+ info("probing at offset 0x%llx, size 0x%llx\n",
(unsigned long long) off, (unsigned long long) size);
if (size < 0x40000)
diff --git a/extras/volume_id/lib/reiserfs.c b/extras/volume_id/lib/reiserfs.c
index 18db63817a..0f30233eaf 100644
--- a/extras/volume_id/lib/reiserfs.c
+++ b/extras/volume_id/lib/reiserfs.c
@@ -60,7 +60,7 @@ int volume_id_probe_reiserfs(struct volume_id *id, uint64_t off, uint64_t size)
struct reiser4_super_block *rs4;
uint8_t *buf;
- info("probing at offset 0x%llx", (unsigned long long) off);
+ info("probing at offset 0x%llx\n", (unsigned long long) off);
buf = volume_id_get_buffer(id, off + REISERFS_SUPERBLOCK_OFFSET, 0x200);
if (buf == NULL)
diff --git a/extras/volume_id/lib/romfs.c b/extras/volume_id/lib/romfs.c
index 2db36d61a5..303a1fb40e 100644
--- a/extras/volume_id/lib/romfs.c
+++ b/extras/volume_id/lib/romfs.c
@@ -37,7 +37,7 @@ int volume_id_probe_romfs(struct volume_id *id, uint64_t off, uint64_t size)
{
struct romfs_super *rfs;
- info("probing at offset 0x%llx", (unsigned long long) off);
+ info("probing at offset 0x%llx\n", (unsigned long long) off);
rfs = (struct romfs_super *) volume_id_get_buffer(id, off, 0x200);
if (rfs == NULL)
diff --git a/extras/volume_id/lib/silicon_raid.c b/extras/volume_id/lib/silicon_raid.c
index 634e4abd0b..cfdcbcb868 100644
--- a/extras/volume_id/lib/silicon_raid.c
+++ b/extras/volume_id/lib/silicon_raid.c
@@ -53,7 +53,7 @@ int volume_id_probe_silicon_medley_raid(struct volume_id *id, uint64_t off, uint
uint64_t meta_off;
struct silicon_meta *sil;
- info("probing at offset 0x%llx, size 0x%llx",
+ info("probing at offset 0x%llx, size 0x%llx\n",
(unsigned long long) off, (unsigned long long) size);
if (size < 0x10000)
diff --git a/extras/volume_id/lib/squashfs.c b/extras/volume_id/lib/squashfs.c
index 035d6fb22a..18e44abcb4 100644
--- a/extras/volume_id/lib/squashfs.c
+++ b/extras/volume_id/lib/squashfs.c
@@ -45,7 +45,7 @@ int volume_id_probe_squashfs(struct volume_id *id, uint64_t off, uint64_t size)
{
struct squashfs_super *sqs;
- info("probing at offset 0x%llx", (unsigned long long) off);
+ info("probing at offset 0x%llx\n", (unsigned long long) off);
sqs = (struct squashfs_super *) volume_id_get_buffer(id, off, 0x200);
if (sqs == NULL)
diff --git a/extras/volume_id/lib/sysv.c b/extras/volume_id/lib/sysv.c
index e48013c2bd..ba37c4d0a6 100644
--- a/extras/volume_id/lib/sysv.c
+++ b/extras/volume_id/lib/sysv.c
@@ -95,7 +95,7 @@ int volume_id_probe_sysv(struct volume_id *id, uint64_t off, uint64_t size)
struct xenix_super *xs;
unsigned int boff;
- info("probing at offset 0x%llx", (unsigned long long) off);
+ info("probing at offset 0x%llx\n", (unsigned long long) off);
for (boff = 0x200; boff <= SYSV_MAX_BLOCKSIZE; boff <<= 1) {
vs = (struct sysv_super *)
diff --git a/extras/volume_id/lib/udf.c b/extras/volume_id/lib/udf.c
index ac2f40a9e8..2a589c5f2a 100644
--- a/extras/volume_id/lib/udf.c
+++ b/extras/volume_id/lib/udf.c
@@ -72,7 +72,7 @@ int volume_id_probe_udf(struct volume_id *id, uint64_t off, uint64_t size)
unsigned int loc;
unsigned int clen;
- info("probing at offset 0x%llx", (unsigned long long) off);
+ info("probing at offset 0x%llx\n", (unsigned long long) off);
vsd = (struct volume_structure_descriptor *) volume_id_get_buffer(id, off + UDF_VSD_OFFSET, 0x200);
if (vsd == NULL)
@@ -100,7 +100,7 @@ blocksize:
vsd = (struct volume_structure_descriptor *) volume_id_get_buffer(id, off + UDF_VSD_OFFSET + bs, 0x800);
if (vsd == NULL)
return -1;
- dbg("test for blocksize: 0x%x", bs);
+ dbg("test for blocksize: 0x%x\n", bs);
if (vsd->id[0] != '\0')
goto nsr;
}
@@ -113,7 +113,7 @@ nsr:
if (vsd == NULL)
return -1;
- dbg("vsd: %c%c%c%c%c",
+ dbg("vsd: %c%c%c%c%c\n",
vsd->id[0], vsd->id[1], vsd->id[2], vsd->id[3], vsd->id[4]);
if (vsd->id[0] == '\0')
@@ -138,7 +138,7 @@ anchor:
/* get desriptor list address and block count */
count = le32_to_cpu(vd->type.anchor.length) / bs;
loc = le32_to_cpu(vd->type.anchor.location);
- dbg("0x%x descriptors starting at logical secor 0x%x", count, loc);
+ dbg("0x%x descriptors starting at logical secor 0x%x\n", count, loc);
/* pick the primary descriptor from the list */
for (b = 0; b < count; b++) {
@@ -147,7 +147,7 @@ anchor:
return -1;
type = le16_to_cpu(vd->tag.id);
- dbg("descriptor type %i", type);
+ dbg("descriptor type %i\n", type);
/* check validity */
if (type == 0)
@@ -164,7 +164,7 @@ pvd:
volume_id_set_label_raw(id, &(vd->type.primary.ident.clen), 32);
clen = vd->type.primary.ident.clen;
- dbg("label string charsize=%i bit", clen);
+ dbg("label string charsize=%i bit\n", clen);
if (clen == 8)
volume_id_set_label_string(id, vd->type.primary.ident.c, 31);
else if (clen == 16)
diff --git a/extras/volume_id/lib/ufs.c b/extras/volume_id/lib/ufs.c
index 4ace8c99fd..bedcfa47da 100644
--- a/extras/volume_id/lib/ufs.c
+++ b/extras/volume_id/lib/ufs.c
@@ -175,20 +175,20 @@ int volume_id_probe_ufs(struct volume_id *id, uint64_t off, uint64_t size)
struct ufs_super_block *ufs;
int offsets[] = {0, 8, 64, 256, -1};
- info("probing at offset 0x%llx", (unsigned long long) off);
+ info("probing at offset 0x%llx\n", (unsigned long long) off);
for (i = 0; offsets[i] >= 0; i++) {
ufs = (struct ufs_super_block *) volume_id_get_buffer(id, off + (offsets[i] * 0x400), 0x800);
if (ufs == NULL)
return -1;
- dbg("offset 0x%x", offsets[i] * 0x400);
+ dbg("offset 0x%x\n", offsets[i] * 0x400);
magic = be32_to_cpu(ufs->fs_magic);
if ((magic == UFS_MAGIC) ||
(magic == UFS2_MAGIC) ||
(magic == UFS_MAGIC_FEA) ||
(magic == UFS_MAGIC_LFN)) {
- dbg("magic 0x%08x(be)", magic);
+ dbg("magic 0x%08x(be)\n", magic);
goto found;
}
magic = le32_to_cpu(ufs->fs_magic);
@@ -196,7 +196,7 @@ int volume_id_probe_ufs(struct volume_id *id, uint64_t off, uint64_t size)
(magic == UFS2_MAGIC) ||
(magic == UFS_MAGIC_FEA) ||
(magic == UFS_MAGIC_LFN)) {
- dbg("magic 0x%08x(le)", magic);
+ dbg("magic 0x%08x(le)\n", magic);
goto found;
}
}
diff --git a/extras/volume_id/lib/util.c b/extras/volume_id/lib/util.c
index 0a3bd39992..2a63efe8f7 100644
--- a/extras/volume_id/lib/util.c
+++ b/extras/volume_id/lib/util.c
@@ -353,33 +353,33 @@ uint8_t *volume_id_get_buffer(struct volume_id *id, uint64_t off, size_t len)
{
ssize_t buf_len;
- info("get buffer off 0x%llx(%llu), len 0x%zx", (unsigned long long) off, (unsigned long long) off, len);
+ info("get buffer off 0x%llx(%llu), len 0x%zx\n", (unsigned long long) off, (unsigned long long) off, len);
/* check if requested area fits in superblock buffer */
if (off + len <= SB_BUFFER_SIZE) {
if (id->sbbuf == NULL) {
id->sbbuf = malloc(SB_BUFFER_SIZE);
if (id->sbbuf == NULL) {
- dbg("error malloc");
+ dbg("error malloc\n");
return NULL;
}
}
/* check if we need to read */
if ((off + len) > id->sbbuf_len) {
- info("read sbbuf len:0x%llx", (unsigned long long) (off + len));
+ info("read sbbuf len:0x%llx\n", (unsigned long long) (off + len));
if (lseek(id->fd, 0, SEEK_SET) < 0) {
- dbg("lseek failed (%s)", strerror(errno));
+ dbg("lseek failed (%s)\n", strerror(errno));
return NULL;
}
buf_len = read(id->fd, id->sbbuf, off + len);
if (buf_len < 0) {
- dbg("read failed (%s)", strerror(errno));
+ dbg("read failed (%s)\n", strerror(errno));
return NULL;
}
- dbg("got 0x%zx (%zi) bytes", buf_len, buf_len);
+ dbg("got 0x%zx (%zi) bytes\n", buf_len, buf_len);
id->sbbuf_len = buf_len;
if ((size_t)buf_len < off + len) {
- dbg("requested 0x%zx bytes, got only 0x%zx bytes", len, buf_len);
+ dbg("requested 0x%zx bytes, got only 0x%zx bytes\n", len, buf_len);
return NULL;
}
}
@@ -387,7 +387,7 @@ uint8_t *volume_id_get_buffer(struct volume_id *id, uint64_t off, size_t len)
return &(id->sbbuf[off]);
} else {
if (len > SEEK_BUFFER_SIZE) {
- dbg("seek buffer too small %d", SEEK_BUFFER_SIZE);
+ dbg("seek buffer too small %d\n", SEEK_BUFFER_SIZE);
return NULL;
}
@@ -395,28 +395,28 @@ uint8_t *volume_id_get_buffer(struct volume_id *id, uint64_t off, size_t len)
if (id->seekbuf == NULL) {
id->seekbuf = malloc(SEEK_BUFFER_SIZE);
if (id->seekbuf == NULL) {
- dbg("error malloc");
+ dbg("error malloc\n");
return NULL;
}
}
/* check if we need to read */
if ((off < id->seekbuf_off) || ((off + len) > (id->seekbuf_off + id->seekbuf_len))) {
- info("read seekbuf off:0x%llx len:0x%zx", (unsigned long long) off, len);
+ info("read seekbuf off:0x%llx len:0x%zx\n", (unsigned long long) off, len);
if (lseek(id->fd, off, SEEK_SET) < 0) {
- dbg("lseek failed (%s)", strerror(errno));
+ dbg("lseek failed (%s)\n", strerror(errno));
return NULL;
}
buf_len = read(id->fd, id->seekbuf, len);
if (buf_len < 0) {
- dbg("read failed (%s)", strerror(errno));
+ dbg("read failed (%s)\n", strerror(errno));
return NULL;
}
- dbg("got 0x%zx (%zi) bytes", buf_len, buf_len);
+ dbg("got 0x%zx (%zi) bytes\n", buf_len, buf_len);
id->seekbuf_off = off;
id->seekbuf_len = buf_len;
if ((size_t)buf_len < len) {
- dbg("requested 0x%zx bytes, got only 0x%zx bytes", len, buf_len);
+ dbg("requested 0x%zx bytes, got only 0x%zx bytes\n", len, buf_len);
return NULL;
}
}
diff --git a/extras/volume_id/lib/via_raid.c b/extras/volume_id/lib/via_raid.c
index 62c165e034..9965e13bc2 100644
--- a/extras/volume_id/lib/via_raid.c
+++ b/extras/volume_id/lib/via_raid.c
@@ -63,7 +63,7 @@ int volume_id_probe_via_raid(struct volume_id *id, uint64_t off, uint64_t size)
uint64_t meta_off;
struct via_meta *via;
- dbg("probing at offset 0x%llx, size 0x%llx",
+ dbg("probing at offset 0x%llx, size 0x%llx\n",
(unsigned long long) off, (unsigned long long) size);
if (size < 0x10000)
diff --git a/extras/volume_id/lib/volume_id.c b/extras/volume_id/lib/volume_id.c
index 7c68fb1ef9..bb909c9956 100644
--- a/extras/volume_id/lib/volume_id.c
+++ b/extras/volume_id/lib/volume_id.c
@@ -358,7 +358,7 @@ int volume_id_probe_raid(struct volume_id *id, uint64_t off, uint64_t size)
if (!device_is_readable(id, off))
return -1;
- info("probing at offset 0x%llx, size 0x%llx",
+ info("probing at offset 0x%llx, size 0x%llx\n",
(unsigned long long) off, (unsigned long long) size);
for (i = 0; i < ARRAY_SIZE(prober_raid); i++)
@@ -392,7 +392,7 @@ int volume_id_probe_filesystem(struct volume_id *id, uint64_t off, uint64_t size
if (!device_is_readable(id, off))
return -1;
- info("probing at offset 0x%llx, size 0x%llx",
+ info("probing at offset 0x%llx, size 0x%llx\n",
(unsigned long long) off, (unsigned long long) size);
for (i = 0; i < ARRAY_SIZE(prober_filesystem); i++)
@@ -493,7 +493,7 @@ struct volume_id *volume_id_open_node(const char *path)
fd = open(path, O_RDONLY);
if (fd < 0) {
- dbg("unable to open '%s'", path);
+ dbg("unable to open '%s'\n", path);
return NULL;
}
diff --git a/extras/volume_id/lib/vxfs.c b/extras/volume_id/lib/vxfs.c
index c9b76285e8..33d357b7d8 100644
--- a/extras/volume_id/lib/vxfs.c
+++ b/extras/volume_id/lib/vxfs.c
@@ -37,7 +37,7 @@ int volume_id_probe_vxfs(struct volume_id *id, uint64_t off, uint64_t size)
{
struct vxfs_super *vxs;
- info("probing at offset 0x%llx", (unsigned long long) off);
+ info("probing at offset 0x%llx\n", (unsigned long long) off);
vxs = (struct vxfs_super *) volume_id_get_buffer(id, off + 0x200, 0x200);
if (vxs == NULL)
diff --git a/extras/volume_id/lib/xfs.c b/extras/volume_id/lib/xfs.c
index 9eac8273c8..3e10560af9 100644
--- a/extras/volume_id/lib/xfs.c
+++ b/extras/volume_id/lib/xfs.c
@@ -45,7 +45,7 @@ int volume_id_probe_xfs(struct volume_id *id, uint64_t off, uint64_t size)
{
struct xfs_super_block *xs;
- info("probing at offset 0x%llx", (unsigned long long) off);
+ info("probing at offset 0x%llx\n", (unsigned long long) off);
xs = (struct xfs_super_block *) volume_id_get_buffer(id, off, 0x200);
if (xs == NULL)
diff --git a/extras/volume_id/vol_id.c b/extras/volume_id/vol_id.c
index 04e85abb7f..5c4e05d794 100644
--- a/extras/volume_id/vol_id.c
+++ b/extras/volume_id/vol_id.c
@@ -218,7 +218,7 @@ int main(int argc, char *argv[])
node = argv[optind];
if (!node) {
- err("no device");
+ err("no device\n");
fprintf(stderr, "no device\n");
rc = 1;
goto exit;
@@ -239,7 +239,7 @@ int main(int argc, char *argv[])
if (ioctl(fd, BLKGETSIZE64, &size) != 0)
size = 0;
- dbg("BLKGETSIZE64=%llu", (unsigned long long)size);
+ dbg("BLKGETSIZE64=%llu\n", (unsigned long long)size);
/* try to drop all privileges before reading disk content */
if (getuid() == 0) {
@@ -250,7 +250,7 @@ int main(int argc, char *argv[])
if (setgroups(0, NULL) != 0 ||
setgid(pw->pw_gid) != 0 ||
setuid(pw->pw_uid) != 0)
- info("unable to drop privileges: %s\n", strerror(errno));
+ info("unable to drop privileges: %s\n\n", strerror(errno));
}
}