summaryrefslogtreecommitdiffstats
path: root/libblkid/src/partitions
diff options
context:
space:
mode:
Diffstat (limited to 'libblkid/src/partitions')
-rw-r--r--libblkid/src/partitions/bsd.c8
-rw-r--r--libblkid/src/partitions/dos.c6
-rw-r--r--libblkid/src/partitions/gpt.c16
-rw-r--r--libblkid/src/partitions/mac.c2
-rw-r--r--libblkid/src/partitions/minix.c2
-rw-r--r--libblkid/src/partitions/partitions.c42
-rw-r--r--libblkid/src/partitions/sgi.c2
-rw-r--r--libblkid/src/partitions/solaris_x86.c4
-rw-r--r--libblkid/src/partitions/sun.c4
-rw-r--r--libblkid/src/partitions/unixware.c2
10 files changed, 44 insertions, 44 deletions
diff --git a/libblkid/src/partitions/bsd.c b/libblkid/src/partitions/bsd.c
index 366bdc475..1bc0088be 100644
--- a/libblkid/src/partitions/bsd.c
+++ b/libblkid/src/partitions/bsd.c
@@ -70,7 +70,7 @@ static int probe_bsd_pt(blkid_probe pr, const struct blkid_idmag *mag)
name = "openbsd";
break;
default:
- DBG(LOWPROBE, blkid_debug(
+ DBG(LOWPROBE, ul_debug(
"WARNING: BSD label detected on unknown (0x%x) "
"primary partition",
blkid_partition_get_type(parent)));
@@ -88,7 +88,7 @@ static int probe_bsd_pt(blkid_probe pr, const struct blkid_idmag *mag)
nparts = le16_to_cpu(l->d_npartitions);
else if (le16_to_cpu(l->d_npartitions) > BSD_MAXPARTITIONS)
- DBG(LOWPROBE, blkid_debug(
+ DBG(LOWPROBE, ul_debug(
"WARNING: ignore %d more BSD partitions",
le16_to_cpu(l->d_npartitions) - BSD_MAXPARTITIONS));
@@ -105,13 +105,13 @@ static int probe_bsd_pt(blkid_probe pr, const struct blkid_idmag *mag)
if (parent && blkid_partition_get_start(parent) == start
&& blkid_partition_get_size(parent) == size) {
- DBG(LOWPROBE, blkid_debug(
+ DBG(LOWPROBE, ul_debug(
"WARNING: BSD partition (%d) same like parent, "
"ignore", i));
continue;
}
if (parent && !blkid_is_nested_dimension(parent, start, size)) {
- DBG(LOWPROBE, blkid_debug(
+ DBG(LOWPROBE, ul_debug(
"WARNING: BSD partition (%d) overflow "
"detected, ignore", i));
continue;
diff --git a/libblkid/src/partitions/dos.c b/libblkid/src/partitions/dos.c
index 346645899..71c9bc85e 100644
--- a/libblkid/src/partitions/dos.c
+++ b/libblkid/src/partitions/dos.c
@@ -159,7 +159,7 @@ static int probe_dos_pt(blkid_probe pr,
* partition table.
*/
if (blkid_probe_is_vfat(pr)) {
- DBG(LOWPROBE, blkid_debug("probably FAT -- ignore"));
+ DBG(LOWPROBE, ul_debug("probably FAT -- ignore"));
goto nothing;
}
@@ -170,7 +170,7 @@ static int probe_dos_pt(blkid_probe pr,
*/
for (p = p0, i = 0; i < 4; i++, p++)
if (p->boot_ind != 0 && p->boot_ind != 0x80) {
- DBG(LOWPROBE, blkid_debug("missing boot indicator -- ignore"));
+ DBG(LOWPROBE, ul_debug("missing boot indicator -- ignore"));
goto nothing;
}
@@ -179,7 +179,7 @@ static int probe_dos_pt(blkid_probe pr,
*/
for (p = p0, i = 0; i < 4; i++, p++) {
if (p->sys_ind == MBR_GPT_PARTITION) {
- DBG(LOWPROBE, blkid_debug("probably GPT -- ignore"));
+ DBG(LOWPROBE, ul_debug("probably GPT -- ignore"));
goto nothing;
}
}
diff --git a/libblkid/src/partitions/gpt.c b/libblkid/src/partitions/gpt.c
index 186fbd929..7fccd51a1 100644
--- a/libblkid/src/partitions/gpt.c
+++ b/libblkid/src/partitions/gpt.c
@@ -236,13 +236,13 @@ static struct gpt_header *get_gpt_header(
h->header_crc32 = orgcrc;
if (crc != le32_to_cpu(orgcrc)) {
- DBG(LOWPROBE, blkid_debug("GPT header corrupted"));
+ DBG(LOWPROBE, ul_debug("GPT header corrupted"));
return NULL;
}
/* Valid header has to be at MyLBA */
if (le64_to_cpu(h->my_lba) != lba) {
- DBG(LOWPROBE, blkid_debug(
+ DBG(LOWPROBE, ul_debug(
"GPT->MyLBA mismatch with real position"));
return NULL;
}
@@ -252,14 +252,14 @@ static struct gpt_header *get_gpt_header(
/* Check if First and Last usable LBA makes sense */
if (lu < fu || fu > lastlba || lu > lastlba) {
- DBG(LOWPROBE, blkid_debug(
+ DBG(LOWPROBE, ul_debug(
"GPT->{First,Last}UsableLBA out of range"));
return NULL;
}
/* The header has to be outside usable range */
if (fu < lba && lba < lu) {
- DBG(LOWPROBE, blkid_debug("GPT header is inside usable area"));
+ DBG(LOWPROBE, ul_debug("GPT header is inside usable area"));
return NULL;
}
@@ -267,7 +267,7 @@ static struct gpt_header *get_gpt_header(
esz = le32_to_cpu(h->num_partition_entries) *
le32_to_cpu(h->sizeof_partition_entry);
if (!esz) {
- DBG(LOWPROBE, blkid_debug("GPT entries undefined"));
+ DBG(LOWPROBE, ul_debug("GPT entries undefined"));
return NULL;
}
@@ -280,14 +280,14 @@ static struct gpt_header *get_gpt_header(
*ents = (struct gpt_entry *) get_lba_buffer(pr,
le64_to_cpu(h->partition_entries_lba), esz);
if (!*ents) {
- DBG(LOWPROBE, blkid_debug("GPT entries unreadable"));
+ DBG(LOWPROBE, ul_debug("GPT entries unreadable"));
return NULL;
}
/* Validate entries */
crc = count_crc32((unsigned char *) *ents, esz);
if (crc != le32_to_cpu(h->partition_entry_array_crc32)) {
- DBG(LOWPROBE, blkid_debug("GPT entries corrupted"));
+ DBG(LOWPROBE, ul_debug("GPT entries corrupted"));
return NULL;
}
@@ -373,7 +373,7 @@ static int probe_gpt_pt(blkid_probe pr,
}
/* the partition has to inside usable range */
if (start < fu || start + size - 1 > lu) {
- DBG(LOWPROBE, blkid_debug(
+ DBG(LOWPROBE, ul_debug(
"GPT entry[%d] overflows usable area - ignore",
i));
blkid_partlist_increment_partno(ls);
diff --git a/libblkid/src/partitions/mac.c b/libblkid/src/partitions/mac.c
index 3b302d92f..428260534 100644
--- a/libblkid/src/partitions/mac.c
+++ b/libblkid/src/partitions/mac.c
@@ -139,7 +139,7 @@ static int probe_mac_pt(blkid_probe pr,
goto nothing;
if (be32_to_cpu(p->map_count) != nblks) {
- DBG(LOWPROBE, blkid_debug(
+ DBG(LOWPROBE, ul_debug(
"mac: inconsisten map_count in partition map, "
"entry[0]: %d, entry[%d]: %d",
nblks, i - 1,
diff --git a/libblkid/src/partitions/minix.c b/libblkid/src/partitions/minix.c
index 2e2a221fa..6c6cb6b16 100644
--- a/libblkid/src/partitions/minix.c
+++ b/libblkid/src/partitions/minix.c
@@ -66,7 +66,7 @@ static int probe_minix_pt(blkid_probe pr,
size = dos_partition_get_size(p);
if (parent && !blkid_is_nested_dimension(parent, start, size)) {
- DBG(LOWPROBE, blkid_debug(
+ DBG(LOWPROBE, ul_debug(
"WARNING: minix partition (%d) overflow "
"detected, ignore", i));
continue;
diff --git a/libblkid/src/partitions/partitions.c b/libblkid/src/partitions/partitions.c
index b116546df..abc7dac4e 100644
--- a/libblkid/src/partitions/partitions.c
+++ b/libblkid/src/partitions/partitions.c
@@ -364,7 +364,7 @@ static void reset_partlist(blkid_partlist ls)
ls->next_partno = 1;
INIT_LIST_HEAD(&ls->l_tabs);
- DBG(LOWPROBE, blkid_debug("partlist reset"));
+ DBG(LOWPROBE, ul_debug("partlist reset"));
}
static blkid_partlist partitions_init_data(struct blkid_chain *chn)
@@ -383,7 +383,7 @@ static blkid_partlist partitions_init_data(struct blkid_chain *chn)
reset_partlist(ls);
- DBG(LOWPROBE, blkid_debug("parts: initialized partitions list (%p, size=%d)",
+ DBG(LOWPROBE, ul_debug("parts: initialized partitions list (%p, size=%d)",
ls, ls->nparts_max));
return ls;
}
@@ -418,7 +418,7 @@ blkid_parttable blkid_partlist_new_parttable(blkid_partlist ls,
INIT_LIST_HEAD(&tab->t_tabs);
list_add_tail(&tab->t_tabs, &ls->l_tabs);
- DBG(LOWPROBE, blkid_debug("parts: create a new partition table "
+ DBG(LOWPROBE, ul_debug("parts: create a new partition table "
"(%p, type=%s, offset=%"PRId64")", tab, type, offset));
return tab;
}
@@ -460,7 +460,7 @@ blkid_partition blkid_partlist_add_partition(blkid_partlist ls,
par->start = start;
par->size = size;
- DBG(LOWPROBE, blkid_debug("parts: add partition (%p start=%"
+ DBG(LOWPROBE, ul_debug("parts: add partition (%p start=%"
PRId64 ", size=%" PRId64 ", table=%p)",
par, par->start, par->size, tab));
return par;
@@ -546,7 +546,7 @@ static int idinfo_probe(blkid_probe pr, const struct blkid_idinfo *id,
/* final check by probing function */
if (id->probefunc) {
- DBG(LOWPROBE, blkid_debug(
+ DBG(LOWPROBE, ul_debug(
"%s: ---> call probefunc()", id->name));
rc = id->probefunc(pr, mag);
if (rc < 0) {
@@ -554,14 +554,14 @@ static int idinfo_probe(blkid_probe pr, const struct blkid_idinfo *id,
reset_partlist(blkid_probe_get_partlist(pr));
if (chn && !chn->binary)
blkid_probe_chain_reset_vals(pr, chn);
- DBG(LOWPROBE, blkid_debug("%s probefunc failed, rc %d",
+ DBG(LOWPROBE, ul_debug("%s probefunc failed, rc %d",
id->name, rc));
}
if (rc == BLKID_PROBE_OK && mag && chn && !chn->binary)
rc = blkid_probe_set_magic(pr, off, mag->len,
(unsigned char *) mag->magic);
- DBG(LOWPROBE, blkid_debug("%s: <--- (rc = %d)", id->name, rc));
+ DBG(LOWPROBE, ul_debug("%s: <--- (rc = %d)", id->name, rc));
}
nothing:
@@ -586,7 +586,7 @@ static int partitions_probe(blkid_probe pr, struct blkid_chain *chn)
if (!pr->wipe_size && (pr->prob_flags & BLKID_PROBE_FL_IGNORE_PT))
goto details_only;
- DBG(LOWPROBE, blkid_debug("--> starting probing loop [PARTS idx=%d]",
+ DBG(LOWPROBE, ul_debug("--> starting probing loop [PARTS idx=%d]",
chn->idx));
i = chn->idx < 0 ? 0 : chn->idx + 1U;
@@ -619,14 +619,14 @@ static int partitions_probe(blkid_probe pr, struct blkid_chain *chn)
(unsigned char *) name,
strlen(name) + 1);
- DBG(LOWPROBE, blkid_debug("<-- leaving probing loop (type=%s) [PARTS idx=%d]",
+ DBG(LOWPROBE, ul_debug("<-- leaving probing loop (type=%s) [PARTS idx=%d]",
name, chn->idx));
rc = 0;
break;
}
if (rc != BLKID_PROBE_OK) {
- DBG(LOWPROBE, blkid_debug("<-- leaving probing loop (failed=%d) [PARTS idx=%d]",
+ DBG(LOWPROBE, ul_debug("<-- leaving probing loop (failed=%d) [PARTS idx=%d]",
rc, chn->idx));
}
@@ -652,7 +652,7 @@ int blkid_partitions_do_subprobe(blkid_probe pr, blkid_partition parent,
blkid_partlist ls;
blkid_loff_t sz, off;
- DBG(LOWPROBE, blkid_debug(
+ DBG(LOWPROBE, ul_debug(
"parts: ----> %s subprobe requested (parent=%p)",
id->name, parent));
@@ -664,7 +664,7 @@ int blkid_partitions_do_subprobe(blkid_probe pr, blkid_partition parent,
off = ((blkid_loff_t) parent->start) << 9;
if (off < pr->off || pr->off + pr->size < off + sz) {
- DBG(LOWPROBE, blkid_debug(
+ DBG(LOWPROBE, ul_debug(
"ERROR: parts: <---- '%s' subprobe: overflow detected.",
id->name));
return -ENOSPC;
@@ -697,7 +697,7 @@ int blkid_partitions_do_subprobe(blkid_probe pr, blkid_partition parent,
blkid_free_probe(prc); /* free cloned prober */
- DBG(LOWPROBE, blkid_debug(
+ DBG(LOWPROBE, ul_debug(
"parts: <---- %s subprobe done (parent=%p, rc=%d)",
id->name, parent, rc));
@@ -789,7 +789,7 @@ int blkid_probe_is_covered_by_pt(blkid_probe pr,
blkid_loff_t start, end;
int nparts, i, rc = 0;
- DBG(LOWPROBE, blkid_debug(
+ DBG(LOWPROBE, ul_debug(
"=> checking if off=%jd size=%jd covered by PT",
offset, size));
@@ -813,7 +813,7 @@ int blkid_probe_is_covered_by_pt(blkid_probe pr,
blkid_partition par = &ls->parts[i];
if (par->start + par->size > (pr->size >> 9)) {
- DBG(LOWPROBE, blkid_debug("partition #%d overflows "
+ DBG(LOWPROBE, ul_debug("partition #%d overflows "
"device (off=%" PRId64 " size=%" PRId64 ")",
par->partno, par->start, par->size));
goto done;
@@ -832,7 +832,7 @@ int blkid_probe_is_covered_by_pt(blkid_probe pr,
done:
blkid_free_probe(prc);
- DBG(LOWPROBE, blkid_debug("<= %s covered by PT", rc ? "IS" : "NOT"));
+ DBG(LOWPROBE, ul_debug("<= %s covered by PT", rc ? "IS" : "NOT"));
return rc;
}
@@ -957,11 +957,11 @@ blkid_partition blkid_partlist_devno_to_partition(blkid_partlist ls, dev_t devno
if (!ls)
return NULL;
- DBG(LOWPROBE, blkid_debug("triyng to convert devno 0x%llx to partition",
+ DBG(LOWPROBE, ul_debug("triyng to convert devno 0x%llx to partition",
(long long) devno));
if (sysfs_init(&sysfs, devno, NULL)) {
- DBG(LOWPROBE, blkid_debug("failed t init sysfs context"));
+ DBG(LOWPROBE, ul_debug("failed t init sysfs context"));
return NULL;
}
rc = sysfs_read_u64(&sysfs, "size", &size);
@@ -993,7 +993,7 @@ blkid_partition blkid_partlist_devno_to_partition(blkid_partlist ls, dev_t devno
return NULL;
if (partno) {
- DBG(LOWPROBE, blkid_debug("mapped by DM, using partno %d", partno));
+ DBG(LOWPROBE, ul_debug("mapped by DM, using partno %d", partno));
/*
* Partition mapped by kpartx does not provide "start" offset
@@ -1015,7 +1015,7 @@ blkid_partition blkid_partlist_devno_to_partition(blkid_partlist ls, dev_t devno
return NULL;
}
- DBG(LOWPROBE, blkid_debug("searching by offset/size"));
+ DBG(LOWPROBE, ul_debug("searching by offset/size"));
for (i = 0; i < ls->nparts; i++) {
blkid_partition par = &ls->parts[i];
@@ -1031,7 +1031,7 @@ blkid_partition blkid_partlist_devno_to_partition(blkid_partlist ls, dev_t devno
}
- DBG(LOWPROBE, blkid_debug("not found partition for device"));
+ DBG(LOWPROBE, ul_debug("not found partition for device"));
return NULL;
}
diff --git a/libblkid/src/partitions/sgi.c b/libblkid/src/partitions/sgi.c
index 4446e5327..99c0bf1c7 100644
--- a/libblkid/src/partitions/sgi.c
+++ b/libblkid/src/partitions/sgi.c
@@ -32,7 +32,7 @@ static int probe_sgi_pt(blkid_probe pr,
}
if (sgi_pt_checksum(l)) {
- DBG(LOWPROBE, blkid_debug(
+ DBG(LOWPROBE, ul_debug(
"detected corrupted sgi disk label -- ignore"));
goto nothing;
}
diff --git a/libblkid/src/partitions/solaris_x86.c b/libblkid/src/partitions/solaris_x86.c
index 16ad0f14e..4ac9be5fe 100644
--- a/libblkid/src/partitions/solaris_x86.c
+++ b/libblkid/src/partitions/solaris_x86.c
@@ -76,7 +76,7 @@ static int probe_solaris_pt(blkid_probe pr,
}
if (le32_to_cpu(l->v_version) != 1) {
- DBG(LOWPROBE, blkid_debug(
+ DBG(LOWPROBE, ul_debug(
"WARNING: unsupported solaris x86 version %d, ignore",
le32_to_cpu(l->v_version)));
goto nothing;
@@ -115,7 +115,7 @@ static int probe_solaris_pt(blkid_probe pr,
start += blkid_partition_get_start(parent);
if (parent && !blkid_is_nested_dimension(parent, start, size)) {
- DBG(LOWPROBE, blkid_debug(
+ DBG(LOWPROBE, ul_debug(
"WARNING: solaris partition (%d) overflow "
"detected, ignore", i));
continue;
diff --git a/libblkid/src/partitions/sun.c b/libblkid/src/partitions/sun.c
index 306a75896..22ee45042 100644
--- a/libblkid/src/partitions/sun.c
+++ b/libblkid/src/partitions/sun.c
@@ -34,7 +34,7 @@ static int probe_sun_pt(blkid_probe pr,
}
if (sun_pt_checksum(l)) {
- DBG(LOWPROBE, blkid_debug(
+ DBG(LOWPROBE, ul_debug(
"detected corrupted sun disk label -- ignore"));
goto nothing;
}
@@ -54,7 +54,7 @@ static int probe_sun_pt(blkid_probe pr,
/* sectors per cylinder (partition offset is in cylinders...) */
spc = be16_to_cpu(l->nhead) * be16_to_cpu(l->nsect);
- DBG(LOWPROBE, blkid_debug("Sun VTOC sanity=%u version=%u nparts=%u",
+ DBG(LOWPROBE, ul_debug("Sun VTOC sanity=%u version=%u nparts=%u",
be32_to_cpu(l->vtoc.sanity),
be32_to_cpu(l->vtoc.version),
be16_to_cpu(l->vtoc.nparts)));
diff --git a/libblkid/src/partitions/unixware.c b/libblkid/src/partitions/unixware.c
index 81393fdc9..6742bcf36 100644
--- a/libblkid/src/partitions/unixware.c
+++ b/libblkid/src/partitions/unixware.c
@@ -150,7 +150,7 @@ static int probe_unixware_pt(blkid_probe pr,
size = le32_to_cpu(p->nr_sects);
if (parent && !blkid_is_nested_dimension(parent, start, size)) {
- DBG(LOWPROBE, blkid_debug(
+ DBG(LOWPROBE, ul_debug(
"WARNING: unixware partition (%d) overflow "
"detected, ignore", i));
continue;