- Properly terminate options array with all-zero entry.
- Fix CRLF end of lines, use LF instead
This commit is contained in:
parent
4ea53bc29b
commit
f4ae8b7691
@ -67,6 +67,7 @@ static struct my_option my_long_options[]=
|
|||||||
NO_ARG, 0, 0, 0, 0, 0, 0},
|
NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"service", 'S', "Name of the existing Windows service",
|
{"service", 'S', "Name of the existing Windows service",
|
||||||
&opt_service, &opt_service, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
&opt_service, &opt_service, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
|
{0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -96,7 +97,7 @@ static void log(const char *fmt, ...)
|
|||||||
va_start(args, fmt);
|
va_start(args, fmt);
|
||||||
vfprintf(stdout,fmt, args);
|
vfprintf(stdout,fmt, args);
|
||||||
va_end(args);
|
va_end(args);
|
||||||
fputc('\n', stdout);
|
fputc('\n', stdout);
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -117,13 +118,13 @@ static void die(const char *fmt, ...)
|
|||||||
logfile_path);
|
logfile_path);
|
||||||
}
|
}
|
||||||
va_end(args);
|
va_end(args);
|
||||||
fputc('\n', stderr);
|
fputc('\n', stderr);
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
/* Cleanup */
|
/* Cleanup */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Stop service that we started, if it was not initally running at
|
Stop service that we started, if it was not initally running at
|
||||||
program start.
|
program start.
|
||||||
*/
|
*/
|
||||||
if (initial_service_state != -1 && initial_service_state != SERVICE_RUNNING)
|
if (initial_service_state != -1 && initial_service_state != SERVICE_RUNNING)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user