summaryrefslogtreecommitdiffstats
path: root/libfdisk/src/label.c
diff options
context:
space:
mode:
authorKarel Zak2014-03-21 13:33:37 +0100
committerKarel Zak2014-03-21 13:33:37 +0100
commitd71bd2f0d6cb2f537fd75537746d1a64170d78aa (patch)
treed77a909d646649aef6b2c3ab98d1ee264e8c55c4 /libfdisk/src/label.c
parentlibfdisk: use new debug functions (diff)
downloadkernel-qcow2-util-linux-d71bd2f0d6cb2f537fd75537746d1a64170d78aa.tar.gz
kernel-qcow2-util-linux-d71bd2f0d6cb2f537fd75537746d1a64170d78aa.tar.xz
kernel-qcow2-util-linux-d71bd2f0d6cb2f537fd75537746d1a64170d78aa.zip
libfdisk: clean up debug output
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libfdisk/src/label.c')
-rw-r--r--libfdisk/src/label.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/libfdisk/src/label.c b/libfdisk/src/label.c
index 5fadb37c0..360089972 100644
--- a/libfdisk/src/label.c
+++ b/libfdisk/src/label.c
@@ -18,10 +18,10 @@ int fdisk_probe_labels(struct fdisk_context *cxt)
if (!lb->op->probe)
continue;
if (lb->disabled) {
- DBG(LABEL, ul_debug("%s disabled -- ignore", lb->name));
+ DBG(CXT, ul_debugobj(cxt, "%s: disabled -- ignore", lb->name));
continue;
}
- DBG(LABEL, ul_debug("probing for %s", lb->name));
+ DBG(CXT, ul_debugobj(cxt, "probing for %s", lb->name));
cxt->label = lb;
rc = lb->op->probe(cxt);
@@ -37,7 +37,7 @@ int fdisk_probe_labels(struct fdisk_context *cxt)
return 0;
}
- DBG(LABEL, ul_debug("no label found"));
+ DBG(CXT, ul_debugobj(cxt, "no label found"));
return 1; /* not found */
}
@@ -260,7 +260,7 @@ int fdisk_create_disklabel(struct fdisk_context *cxt, const char *name)
if (haslabel && !cxt->parent)
fdisk_reset_device_properties(cxt);
- DBG(LABEL, ul_debug("create a new %s label", lb->name));
+ DBG(CXT, ul_debugobj(cxt, "create a new %s label", lb->name));
return cxt->label->op->create(cxt);
}
@@ -273,7 +273,7 @@ int fdisk_locate_disklabel(struct fdisk_context *cxt, int n, const char **name,
if (!cxt->label->op->locate)
return -ENOSYS;
- DBG(LABEL, ul_debug("locating %d chunk of %s.", n, cxt->label->name));
+ DBG(CXT, ul_debugobj(cxt, "locating %d chunk of %s.", n, cxt->label->name));
return cxt->label->op->locate(cxt, n, name, offset, size);
}
@@ -292,7 +292,7 @@ int fdisk_get_disklabel_id(struct fdisk_context *cxt, char **id)
if (!cxt->label->op->get_id)
return -ENOSYS;
- DBG(LABEL, ul_debug("asking for disk %s ID", cxt->label->name));
+ DBG(CXT, ul_debugobj(cxt, "asking for disk %s ID", cxt->label->name));
return cxt->label->op->get_id(cxt, id);
}
@@ -309,7 +309,7 @@ int fdisk_set_disklabel_id(struct fdisk_context *cxt)
if (!cxt->label->op->set_id)
return -ENOSYS;
- DBG(LABEL, ul_debug("setting %s disk ID", cxt->label->name));
+ DBG(CXT, ul_debugobj(cxt, "setting %s disk ID", cxt->label->name));
return cxt->label->op->set_id(cxt);
}
@@ -330,7 +330,7 @@ int fdisk_set_partition_type(struct fdisk_context *cxt,
if (!cxt->label->op->part_set_type)
return -ENOSYS;
- DBG(LABEL, ul_debug("partition: %zd: set type", partnum));
+ DBG(CXT, ul_debugobj(cxt, "partition: %zd: set type", partnum));
return cxt->label->op->part_set_type(cxt, partnum, t);
}
@@ -369,7 +369,7 @@ int fdisk_partition_toggle_flag(struct fdisk_context *cxt,
rc = cxt->label->op->part_toggle_flag(cxt, partnum, flag);
- DBG(LABEL, ul_debug("partition: %zd: toggle: 0x%04lx [rc=%d]", partnum, flag, rc));
+ DBG(CXT, ul_debugobj(cxt, "partition: %zd: toggle: 0x%04lx [rc=%d]", partnum, flag, rc));
return rc;
}