[DRBD-cvs] svn commit by phil - r2320 - trunk/user - * Allow to specify the protocol in the common section.

drbd-cvs at lists.linbit.com drbd-cvs at lists.linbit.com
Tue Aug 1 12:35:27 CEST 2006


Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Author: phil
Date: 2006-08-01 12:35:23 +0200 (Tue, 01 Aug 2006)
New Revision: 2320

Modified:
   trunk/user/drbdadm_main.c
   trunk/user/drbdadm_parser.c
Log:
* Allow to specify the protocol in the common section.
* It is spelled 'flexible-meta-disk'.



Modified: trunk/user/drbdadm_main.c
===================================================================
--- trunk/user/drbdadm_main.c	2006-08-01 10:06:03 UTC (rev 2319)
+++ trunk/user/drbdadm_main.c	2006-08-01 10:35:23 UTC (rev 2320)
@@ -319,7 +319,7 @@
 static int adm_dump(struct d_resource* res,const char* unused __attribute((unused)))
 {
   printI("resource %s {\n",esc(res->name)); ++indent;
-  printA("protocol",res->protocol);
+  if(res->protocol) printA("protocol",res->protocol);
   dump_host_info(res->me);
   dump_host_info(res->peer);
   dump_options("net",res->net_options);
@@ -482,6 +482,9 @@
     expand_opts(common->sync_options,    &res->sync_options);
     expand_opts(common->startup_options, &res->startup_options);
     expand_opts(common->handlers,        &res->handlers);
+    if(common->protocol && ! res->protocol) {
+      res->protocol = strdup(common->protocol);
+    }
   }
 }
 

Modified: trunk/user/drbdadm_parser.c
===================================================================
--- trunk/user/drbdadm_parser.c	2006-08-01 10:06:03 UTC (rev 2319)
+++ trunk/user/drbdadm_parser.c	2006-08-01 10:35:23 UTC (rev 2320)
@@ -413,7 +413,7 @@
 			goto break_loop;
 		default:
 			pe_expected("disk | device | address | meta-disk "
-				    "| flex-meta-disk");
+				    "| flexible-meta-disk");
 		}
 	}
       break_loop:



More information about the drbd-cvs mailing list