summaryrefslogtreecommitdiffstats
path: root/tools/pvchange.c
diff options
context:
space:
mode:
authorJoe Thornber <thornber@redhat.com>2001-10-25 14:04:18 +0000
committerJoe Thornber <thornber@redhat.com>2001-10-25 14:04:18 +0000
commitc7f0b573ac145e3b1b8605d95ce711d62d59f792 (patch)
tree325e0b7b069d9f68567faf4354932faca1ea19ba /tools/pvchange.c
parent3cfae6cfce9c591923864fe13c560c145469bc9c (diff)
downloadlvm2-c7f0b573ac145e3b1b8605d95ce711d62d59f792.tar.gz
lvm2-c7f0b573ac145e3b1b8605d95ce711d62d59f792.tar.xz
lvm2-c7f0b573ac145e3b1b8605d95ce711d62d59f792.zip
o use dev_name(dev) to get the name of a device, this operation is cheap
since it just get's the first alias.
Diffstat (limited to 'tools/pvchange.c')
-rw-r--r--tools/pvchange.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/pvchange.c b/tools/pvchange.c
index 3ab5a65f..7fbdc4ce 100644
--- a/tools/pvchange.c
+++ b/tools/pvchange.c
@@ -89,7 +89,7 @@ int pvchange_single(struct physical_volume *pv)
struct volume_group *vg = NULL;
struct list_head *pvh;
- char *pv_name = pv->dev->name;
+ const char *pv_name = dev_name(pv->dev);
int allocation = !strcmp(arg_str_value(allocation_ARG, "n"), "y");
@@ -135,7 +135,7 @@ int pvchange_single(struct physical_volume *pv)
log_verbose("Physical volume %s inactive", pv_name);
}
- log_verbose("Updating physical volume %s", pv->dev->name);
+ log_verbose("Updating physical volume %s", pv_name);
if (*pv->vg_name) {
if (!(ios->vg_write(ios,vg))) {
log_error("Failed to store physical volume %s in "