[DRBD-cvs] svn commit by phil - r2970 - branches/drbd-8.0/user - We
need to expand the common section also for command w
drbd-cvs at lists.linbit.com
drbd-cvs at lists.linbit.com
Wed Jul 18 11:31:14 CEST 2007
Author: phil
Date: 2007-07-18 11:31:05 +0200 (Wed, 18 Jul 2007)
New Revision: 2970
Modified:
branches/drbd-8.0/user/drbdadm_main.c
Log:
We need to expand the common section also for command which
does not need a resource name. Simple logic bug. It came
to surface as we recognised that the startup section does
not get expanded for the "drbdadm wait-con-int" command.
Modified: branches/drbd-8.0/user/drbdadm_main.c
===================================================================
--- branches/drbd-8.0/user/drbdadm_main.c 2007-07-14 20:56:41 UTC (rev 2969)
+++ branches/drbd-8.0/user/drbdadm_main.c 2007-07-18 09:31:05 UTC (rev 2970)
@@ -1625,6 +1625,8 @@
struct adm_cmd *cmd;
struct d_resource *res,*tmp;
char *env_drbd_nodename = NULL;
+ int is_dump_xml;
+ int is_dump;
drbdsetup=NULL;
drbdmeta=NULL;
@@ -1835,14 +1837,15 @@
uc_node(global_options.usage_count);
+ is_dump_xml = (cmd->function == adm_dump_xml);
+ is_dump = (is_dump_xml || cmd->function == adm_dump);
+ if (!is_dump || dry_run) expand_common();
+
if(cmd->res_name_required)
{
- int is_dump_xml = (cmd->function == adm_dump_xml);
- int is_dump = (is_dump_xml || cmd->function == adm_dump);
if (optind + 1 > argc && !is_dump)
print_usage_and_exit("missing arguments"); // arguments missing.
- if (!is_dump || dry_run) expand_common();
global_validate();
if (!is_dump) {
if(!config_valid) exit(E_config_invalid);
More information about the drbd-cvs
mailing list