diff options
author | Tony Asleson <tasleson@redhat.com> | 2013-04-02 16:10:18 -0400 |
---|---|---|
committer | Tony Asleson <tasleson@redhat.com> | 2013-07-02 14:24:34 -0500 |
commit | e33ac7b1ed962abb5ccb3d12a5401c84a188bf92 (patch) | |
tree | 298042accbb3c063274ae08a080b6366de843be5 /liblvm/lvm_pv.c | |
parent | ef3ab801e8604d8f629badc1cac1d9190467033f (diff) | |
download | lvm2-e33ac7b1ed962abb5ccb3d12a5401c84a188bf92.tar.gz |
lvm2app: Implement lvm_pv_remove V2
Code move and changes to support calling code from
command line and from library interface.
V2 Change lock_vol call
Signed-off-by: Tony Asleson <tasleson@redhat.com>
Diffstat (limited to 'liblvm/lvm_pv.c')
-rw-r--r-- | liblvm/lvm_pv.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/liblvm/lvm_pv.c b/liblvm/lvm_pv.c index db6c39db6..8f53352c2 100644 --- a/liblvm/lvm_pv.c +++ b/liblvm/lvm_pv.c @@ -75,6 +75,14 @@ struct lvm_list_wrapper struct dm_list vgslist; }; +int lvm_pv_remove(lvm_t libh, const char *pv_name) +{ + struct cmd_context *cmd = (struct cmd_context *)libh; + if ( 1 != pvremove_single(cmd, pv_name, NULL, 0, 0)) { + return -1; + } + return 0; +} struct dm_list *lvm_list_pvs(lvm_t libh) { |