diff options
author | Peter Rajnoha <prajnoha@redhat.com> | 2011-02-21 12:15:59 +0000 |
---|---|---|
committer | Peter Rajnoha <prajnoha@redhat.com> | 2011-02-21 12:15:59 +0000 |
commit | 305816232db1141d311260d828d08f885bb0a88b (patch) | |
tree | 8bf8669cce02375eba1ff7adaa5eab52eca73985 /tools/pvremove.c | |
parent | 6e0b348d34a3fa4a646a0e924fc54a313a723c9c (diff) | |
download | lvm2-305816232db1141d311260d828d08f885bb0a88b.tar.gz lvm2-305816232db1141d311260d828d08f885bb0a88b.tar.xz lvm2-305816232db1141d311260d828d08f885bb0a88b.zip |
Remove useless mdas parameter for pv_read (from now on, we store mdas in a
format instance)
Diffstat (limited to 'tools/pvremove.c')
-rw-r--r-- | tools/pvremove.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/tools/pvremove.c b/tools/pvremove.c index a8717e05..ace3c1d0 100644 --- a/tools/pvremove.c +++ b/tools/pvremove.c @@ -25,15 +25,12 @@ const char _really_wipe[] = static int pvremove_check(struct cmd_context *cmd, const char *name) { struct physical_volume *pv; - struct dm_list mdas; - - dm_list_init(&mdas); /* FIXME Check partition type is LVM unless --force is given */ /* Is there a pv here already? */ /* If not, this is an error unless you used -f. */ - if (!(pv = pv_read(cmd, name, &mdas, NULL, 1, 0))) { + if (!(pv = pv_read(cmd, name, NULL, 1, 0))) { if (arg_count(cmd, force_ARG)) return 1; log_error("Physical Volume %s not found", name); @@ -47,13 +44,14 @@ static int pvremove_check(struct cmd_context *cmd, const char *name) * means checking every VG by scanning every * PV on the system. */ - if (is_orphan(pv) && !dm_list_size(&mdas)) { + if (is_orphan(pv) && !dm_list_size(&pv->fid->metadata_areas_in_use) && + !dm_list_size(&pv->fid->metadata_areas_ignored)) { if (!scan_vgs_for_pvs(cmd, 0)) { log_error("Rescan for PVs without metadata areas " "failed."); return 0; } - if (!(pv = pv_read(cmd, name, NULL, NULL, 1, 0))) { + if (!(pv = pv_read(cmd, name, NULL, 1, 0))) { log_error("Failed to read physical volume %s", name); return 0; } |