diff options
author | Kay Sievers <kay.sievers@vrfy.org> | 2008-04-20 21:07:06 +0200 |
---|---|---|
committer | Kay Sievers <kay.sievers@vrfy.org> | 2008-04-20 21:07:06 +0200 |
commit | c70560feef0eb61a150cd2f956f0beead4313ffe (patch) | |
tree | 48db1f001e87e46b0ccd2b30704b87a8662ba9b9 /extras/volume_id | |
parent | 1d918b50cddc975abbfd06af134a6d843d9bc7f0 (diff) |
logging: add trailing newline to all strings
Diffstat (limited to 'extras/volume_id')
36 files changed, 119 insertions, 119 deletions
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)); } } |