[DRBD-cvs] user by lars; .: added trustix to "known" distros user...
drbd-user@lists.linbit.com
drbd-user@lists.linbit.com
Sun, 22 Feb 2004 21:42:51 +0100 (CET)
DRBD CVS committal
Author : lars
Project : drbd
Module : user
Dir : drbd/user
Modified Files:
drbdsetup.c
Log Message:
.: added trustix to "known" distros
user: exculde default "do not change" value
from range check for sync-nice
scripts: removed absolute path from logger
===================================================================
RCS file: /var/lib/cvs/drbd/drbd/user/drbdsetup.c,v
retrieving revision 1.67
retrieving revision 1.68
diff -u -3 -r1.67 -r1.68
--- drbdsetup.c 24 Jan 2004 10:47:29 -0000 1.67
+++ drbdsetup.c 22 Feb 2004 20:42:45 -0000 1.68
@@ -379,6 +379,11 @@
break;
case 'P':
cn->sync.nice = m_strtol(optarg,1);
+ /* range check for nice value */
+ if (-20 > cn->sync.nice || cn->sync.nice > 19) {
+ fprintf(stderr,"sync-nice has to be in the range [-20;19].\n");
+ return 20;
+ }
break;
case 'g':
cn->sync.group = m_strtol(optarg, 1);
@@ -435,12 +440,6 @@
// avoid priority flipflops
cn->sync.max=(int)(1.1 * (double)cn->sync.min);
// do I need to check for overflow?
- }
-
- /* range check for nice value */
- if (cn->sync.nice < -20 || cn->sync.nice > 19) {
- fprintf(stderr,"sync-nice has to be in the range [-20;19].\n");
- return 20;
}
/* sanity checks of the timeouts */