master - tools: Reinstate lvm script processing.
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=2eaca7ab63345594ccfd7133ddf92729b7e7691c Commit: 2eaca7ab63345594ccfd7133ddf92729b7e7691c Parent: fe3b9bb7d47ef168c16cc35e306a41cbb38e869c Author: Alasdair G Kergon <[email protected]> AuthorDate: Thu Mar 23 23:03:25 2017 +0000 Committer: Alasdair G Kergon <[email protected]> CommitterDate: Thu Mar 23 23:20:53 2017 +0000
tools: Reinstate lvm script processing.
We check for a script if the command isn't recognised (ENO_SUCH_CMD). (Also added a few comments and fixed some whitespace.)
--- tools/command.c | 2 +- tools/command.h | 2 +- tools/lvm2cmdline.h | 2 +- tools/lvmcmdline.c | 97 ++++++++++++++++++++++++-------------------------- 4 files changed, 50 insertions(+), 53 deletions(-)
tools/command.c +1 -1
@@ -1348,7 +1348,7 @@ static int copy_line(char *line, int max_line, int *position)return 1 ; } -int define_commands (char *run_name) +int define_commands (const char *run_name) {struct command *cmd =NULL ;char line[MAX_LINE ];
tools/command.h +1 -1
@@ -255,7 +255,7 @@ struct lv_type { }; -int define_commands (char *run_name); +int define_commands (const char *run_name);int command_id_to_enum (const char *str);void print_usage (struct command *cmd,int longhelp,int desc_first);void print_usage_common_cmd (struct command_name *cname,struct command *cmd);
tools/lvm2cmdline.h +1 -1
@@ -32,7 +32,7 @@ void *cmdlib_lvm2_init(unsigned static_compile);void lvm_fin (struct cmd_context *cmd);struct cmd_context *init_lvm (unsigned set_connections,unsigned set_filters); -int lvm_register_commands (char *name); +int lvm_register_commands (const char *name);int lvm_split (char *str,int *argc,char **argv,int max);int lvm_run_command (struct cmd_context *cmd,int argc,char **argv);int lvm_return_code (int ret);
tools/lvmcmdline.c +47 -50
187 lines not on this page · raw message