master - toollib: find VG name in option values when needed
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=95e38607ecf44fece40dd4a1b078582554c93da1 Commit: 95e38607ecf44fece40dd4a1b078582554c93da1 Parent: 0e3e611a137a264a343335d18d500fce7af8e0f7 Author: David Teigland <[email protected]> AuthorDate: Fri Dec 9 13:30:42 2016 -0600 Committer: David Teigland <[email protected]> CommitterDate: Mon Feb 13 08:20:10 2017 -0600
toollib: find VG name in option values when needed
--- tools/commands.h | 2 +- tools/lvconvert.c | 2 + tools/toollib.c | 158 ++++++++++++++++++++++++++++++++++++++++++++++++++++- tools/tools.h | 2 + 4 files changed, 162 insertions(+), 2 deletions(-)
tools/commands.h +1 -1
@@ -47,7 +47,7 @@ xx(lvchange,xx (lvconvert,"Change logical volume layout" , - 0) + GET_VGNAME_FROM_OPTIONS) xx(lvcreate, "Create a logical volume",
tools/lvconvert.c +2 -0
@@ -5386,6 +5386,8 @@ int lvconvert(struct cmd_context * cmd, int argc, char **argv) };struct processing_handle *handle =init_processing_handle (cmd,NULL ); + cmd->command->flags &= ~GET_VGNAME_FROM_OPTIONS ; +if (!handle) {log_error ("Failed to initialize processing handle." );return ECMD_FAILED ;
tools/toollib.c +157 -1
170 lines not on this page · raw message
tools/tools.h +2 -0
@@ -162,6 +162,8 @@ struct lv_types {#define ENABLE_DUPLICATE_DEVS 0x00000400/* Command does not accept tags as args. */ #define DISALLOW_TAG_ARGS 0x00000800 +/* Command may need to find VG name in an option value. */ +#define GET_VGNAME_FROM_OPTIONS 0x00001000void usage (const char *name);