summaryrefslogtreecommitdiffstats
path: root/tools/pvscan.c
diff options
context:
space:
mode:
authorJoe Thornber <thornber@redhat.com>2002-01-21 11:29:06 +0000
committerJoe Thornber <thornber@redhat.com>2002-01-21 11:29:06 +0000
commitd29265b97d3f8d8ad8ae96f647433def6e89fbaa (patch)
tree9e1351e6925f39d3a553ef61eba8e510672eae0b /tools/pvscan.c
parent12137231d373724037d654f07762d9ffc05159e7 (diff)
downloadlvm2-d29265b97d3f8d8ad8ae96f647433def6e89fbaa.tar.gz
lvm2-d29265b97d3f8d8ad8ae96f647433def6e89fbaa.tar.xz
lvm2-d29265b97d3f8d8ad8ae96f647433def6e89fbaa.zip
o removed display_uuid
o use id_write_format from lib/uuid/uuid.h instead
Diffstat (limited to 'tools/pvscan.c')
-rw-r--r--tools/pvscan.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/tools/pvscan.c b/tools/pvscan.c
index 4d9580bf..41ac2a5a 100644
--- a/tools/pvscan.c
+++ b/tools/pvscan.c
@@ -131,7 +131,7 @@ int pvscan(int argc, char **argv)
void pvscan_display_single(struct physical_volume *pv)
{
-
+ char uuid[64];
int vg_name_len = 0;
char *s1, *s2;
@@ -161,10 +161,13 @@ void pvscan_display_single(struct physical_volume *pv)
vg_name_len = strlen(pv->vg_name) - sizeof (EXPORTED_TAG) + 1;
if (arg_count(uuid_ARG)) {
- sprintf(pv_tmp_name,
- "%-*s with UUID %s",
- pv_max_name_len - 2,
- dev_name(pv->dev), display_uuid(pv->id.uuid));
+ if (!id_write_format(&pv->id, uuid, sizeof(uuid))) {
+ stack;
+ return;
+ }
+
+ sprintf(pv_tmp_name, "%-*s with UUID %s",
+ pv_max_name_len - 2, dev_name(pv->dev), uuid);
} else {
sprintf(pv_tmp_name, "%s", dev_name(pv->dev));
}