master - clvmd: fix parsing of -d argument
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=13fe333b54c2dedf91af2f663d6ac9bd883c3b87 Commit: 13fe333b54c2dedf91af2f663d6ac9bd883c3b87 Parent: 5f5a5d1f53d4dac462f447c0db692229f4a501b3 Author: Zdenek Kabelac <[email protected]> AuthorDate: Fri Oct 19 15:18:19 2012 +0200 Committer: Zdenek Kabelac <[email protected]> CommitterDate: Fri Oct 19 15:35:56 2012 +0200
clvmd: fix parsing of -d argument
clvmd -d option parsing was not working properly.
clvmd -d 2 (with space) has been ignored because of
'::' used in getopt string, and as failsafe it's been used '1'.
Later this debug_arg has been ignored and debug_opt was used instead which happend to have value '1'.
Submitted-by Robert Milasan <[email protected]>
Reported-by Robert Milasan <[email protected]>
--- WHATS_NEW | 1 + daemons/clvmd/clvmd.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-)
WHATS_NEW +1 -0
@@ -1,5 +1,6 @@ Version 2.02.99 - =================================== + Fix clvmd support for option -d and properly use its argument. Support use of option --yes for lvchange --persistent. Fix memory leak on error path for pvcreate with invalid uuid. Use lv_is_active() instead of lv_info() call.
daemons/clvmd/clvmd.c +2 -2
@@ -362,7 +362,7 @@ int main(int argc, char *argv[])/* Deal with command-line arguments */ opterr =0 ; optind =0 ; -while ((opt =getopt_long (argc, argv,"vVhfd::t:RST:CI:E:" , +while ((opt =getopt_long (argc, argv,"vVhfd:t:RST:CI:E:" , longopts,NULL )) !=-1 ) {switch (opt) {case 'h' :
@@ -449,7 +449,7 @@ int main(int argc, char *argv[])return debug_clvmd (debug_arg, clusterwide_opt)==1 ?0 :1 ; } -clvmd_set_debug (debug_opt); +clvmd_set_debug (debug_arg);/* Fork into the background (unless requested not to) */ if (!foreground_mode)