From 706e124e826527315496bf8ebcdf0f435e69f2ee Mon Sep 17 00:00:00 2001 From: Ron Koenderink Date: Wed, 16 Mar 2005 01:51:22 +0000 Subject: [PATCH] (main) [_WIN32]: Add check to command line checks to ensure -p is not used with install or remove sevice options. (main) [_WIN32]: Improve error messages for errors found duing the command line checks. --- src/server/main.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/server/main.c b/src/server/main.c index f9006c10..aa248f07 100644 --- a/src/server/main.c +++ b/src/server/main.c @@ -168,20 +168,20 @@ main(int argc, char **argv) } #if defined(_WIN32) - if ((debug || datadir_set || config_file != NULL) && + if ((debug || flags || datadir_set || config_file != NULL) && remove_service_set) { - fprintf(stderr, "Can't use -d, -D or -e with either " - "-r or -R options when starting the server\n"); + fprintf(stderr, "Can't use -p, -d, -D or -e with either " + "-r or -R options\n"); exit(EXIT_FAILURE); } - if (debug && install_service_set) { - fprintf(stderr, "Can't use -d with either " - "-i or -I options when starting the server\n"); + if ((debug || flags) && install_service_set) { + fprintf(stderr, "Can't use -d or -p with either " + "-i or -I options\n"); exit(EXIT_FAILURE); } if (install_service_set && remove_service_set) { - fprintf(stderr, "Can't use both -r or -R and -i or -I options when starting " - "the server\n"); + fprintf(stderr, "Can't use both -r or -R and -i or -I " + "options\n"); exit(EXIT_FAILURE); } #endif /* _WIN32 */