[DRBD-cvs] svn commit by lars - r2442 - branches/drbd-0.7/user -
don't use progname before it is defined
drbd-cvs at lists.linbit.com
drbd-cvs at lists.linbit.com
Thu Sep 21 11:52:09 CEST 2006
Author: lars
Date: 2006-09-21 11:52:08 +0200 (Thu, 21 Sep 2006)
New Revision: 2442
Modified:
branches/drbd-0.7/user/drbdadm_main.c
Log:
don't use progname before it is defined
Modified: branches/drbd-0.7/user/drbdadm_main.c
===================================================================
--- branches/drbd-0.7/user/drbdadm_main.c 2006-09-21 08:58:10 UTC (rev 2441)
+++ branches/drbd-0.7/user/drbdadm_main.c 2006-09-21 09:52:08 UTC (rev 2442)
@@ -1181,8 +1181,6 @@
" PRETENDING that I am >>%s<<\n\n",nodeinfo.nodename);
}
- if(argc == 1) print_usage_and_exit("missing arguments"); // arguments missing.
-
/* in case drbdadm is called with an absolut or relative pathname
* look for the drbdsetup binary in the same location,
* otherwise, just let execvp sort it out... */
@@ -1200,6 +1198,9 @@
}
argv[0] = progname;
}
+
+ if(argc == 1) print_usage_and_exit("missing arguments"); // arguments missing.
+
if (drbdsetup == NULL) {
fprintf(stderr,"could not strdup argv[0].\n");
exit(E_exec_error);
More information about the drbd-cvs
mailing list