[DRBD-cvs] svn commit by phil - r2389 - in trunk: drbd user - Now
drbdadm adjust seems to work again...
drbd-cvs at lists.linbit.com
drbd-cvs at lists.linbit.com
Mon Aug 28 14:16:55 CEST 2006
Author: phil
Date: 2006-08-28 14:16:33 +0200 (Mon, 28 Aug 2006)
New Revision: 2389
Modified:
trunk/drbd/drbd_nl.c
trunk/user/drbdadm_adjust.c
trunk/user/drbdadm_scanner.fl
trunk/user/drbdsetup.c
trunk/user/drbdtool_common.c
Log:
Now drbdadm adjust seems to work again...
Modified: trunk/drbd/drbd_nl.c
===================================================================
--- trunk/drbd/drbd_nl.c 2006-08-28 11:48:29 UTC (rev 2388)
+++ trunk/drbd/drbd_nl.c 2006-08-28 12:16:33 UTC (rev 2389)
@@ -51,7 +51,6 @@
int tag; \
int dlen; \
\
- memset(arg,0,sizeof(struct name)); \
while( (tag = *tags++) != TT_END ) { \
dlen = *tags++; \
switch( tag_number(tag) ) { \
@@ -376,6 +375,7 @@
goto fail;
}
+ memset(&primary_args, 0, sizeof(struct primary));
if(!primary_from_tags(mdev,nlp->tag_list,&primary_args)) {
retcode=UnknownMandatoryTag;
goto fail;
@@ -1243,6 +1243,7 @@
goto fail;
}
+ memset(&rs, 0, sizeof(struct resize));
if (!resize_from_tags(mdev,nlp->tag_list,&rs)) {
retcode=UnknownMandatoryTag;
goto fail;
Modified: trunk/user/drbdadm_adjust.c
===================================================================
--- trunk/user/drbdadm_adjust.c 2006-08-28 11:48:29 UTC (rev 2388)
+++ trunk/user/drbdadm_adjust.c 2006-08-28 12:16:33 UTC (rev 2389)
@@ -94,8 +94,8 @@
while(running) {
if((opt=find_opt(conf,running->name))) {
if(!ov_eq(running->value,opt->value)) {
- /*printf("Value of '%s' differs: r=%s c=%s\n",
- opt->name,running->value,opt->value);*/
+ /* printf("Value of '%s' differs: r=%s c=%s\n",
+ opt->name,running->value,opt->value); */
return 0;
}
opt->mentioned=1;
Modified: trunk/user/drbdadm_scanner.fl
===================================================================
--- trunk/user/drbdadm_scanner.fl 2006-08-28 11:48:29 UTC (rev 2388)
+++ trunk/user/drbdadm_scanner.fl 2006-08-28 12:16:33 UTC (rev 2389)
@@ -24,7 +24,7 @@
%option noyywrap
-NUM [0-9]{1,8}[MKG]?
+NUM [0-9]{1,8}[MKGs]?
SNUMB [0-9]{1,3}
IPV4ADDR ({SNUMB}"."){3}{SNUMB}
WS [ \t]
Modified: trunk/user/drbdsetup.c
===================================================================
--- trunk/user/drbdsetup.c 2006-08-28 11:48:29 UTC (rev 2388)
+++ trunk/user/drbdsetup.c 2006-08-28 12:16:33 UTC (rev 2389)
@@ -718,6 +718,7 @@
void show_numeric(struct drbd_option *od, unsigned short* tp)
{
long long val;
+ const unsigned char def_unit = od->numeric_param.default_unit;
switch(tag_type(*tp++)) {
case TT_INTEGER:
@@ -733,7 +734,8 @@
val=0;
}
- printf("\t%-16s\t%lld",od->name,val);
+ if(def_unit == 1) printf("\t%-16s\t%lld",od->name,val);
+ else printf("\t%-16s\t%lld%c",od->name,val,def_unit);
if(val == (long long) od->numeric_param.def) printf(" _is_default");
printf(";\n");
}
Modified: trunk/user/drbdtool_common.c
===================================================================
--- trunk/user/drbdtool_common.c 2006-08-28 11:48:29 UTC (rev 2388)
+++ trunk/user/drbdtool_common.c 2006-08-28 12:16:33 UTC (rev 2389)
@@ -122,6 +122,9 @@
case 'g':
shift += 30;
break;
+ case 's':
+ shift += 9;
+ break;
default:
fprintf(stderr, "%s is not a valid number\n", s);
exit(20);
More information about the drbd-cvs
mailing list