notify.c | notify.c | |||
---|---|---|---|---|
skipping to change at line 30 | skipping to change at line 30 | |||
***/ | ***/ | |||
#include <stdio.h> | #include <stdio.h> | |||
#include <getopt.h> | #include <getopt.h> | |||
#include <error.h> | #include <error.h> | |||
#include <errno.h> | #include <errno.h> | |||
#include <unistd.h> | #include <unistd.h> | |||
#include <stdlib.h> | #include <stdlib.h> | |||
#include <string.h> | #include <string.h> | |||
#include <systemd/sd-daemon.h> | #include "systemd/sd-daemon.h" | |||
#include "strv.h" | #include "strv.h" | |||
#include "util.h" | #include "util.h" | |||
#include "log.h" | #include "log.h" | |||
#include "sd-readahead.h" | #include "sd-readahead.h" | |||
#include "build.h" | #include "build.h" | |||
#include "env-util.h" | #include "env-util.h" | |||
static bool arg_ready = false; | static bool arg_ready = false; | |||
static pid_t arg_pid = 0; | static pid_t arg_pid = 0; | |||
static const char *arg_status = NULL; | static const char *arg_status = NULL; | |||
static bool arg_booted = false; | static bool arg_booted = false; | |||
static const char *arg_readahead = NULL; | static const char *arg_readahead = NULL; | |||
static int help(void) { | static void help(void) { | |||
printf("%s [OPTIONS...] [VARIABLE=VALUE...]\n\n" | printf("%s [OPTIONS...] [VARIABLE=VALUE...]\n\n" | |||
"Notify the init system about service status updates.\n\n" | "Notify the init system about service status updates.\n\n" | |||
" -h --help Show this help\n" | " -h --help Show this help\n" | |||
" --version Show package version\n" | " --version Show package version\n" | |||
" --ready Inform the init system about servic e start-up completion\n" | " --ready Inform the init system about servic e start-up completion\n" | |||
" --pid[=PID] Set main pid of daemon\n" | " --pid[=PID] Set main pid of daemon\n" | |||
" --status=TEXT Set status text\n" | " --status=TEXT Set status text\n" | |||
" --booted Returns 0 if the system was booted up with systemd, non-zero otherwise\n" | " --booted Returns 0 if the system was booted up with systemd, non-zero otherwise\n" | |||
" --readahead=ACTION Controls read-ahead operations\n", | " --readahead=ACTION Controls read-ahead operations\n", | |||
program_invocation_short_name); | program_invocation_short_name); | |||
return 0; | ||||
} | } | |||
static int parse_argv(int argc, char *argv[]) { | static int parse_argv(int argc, char *argv[]) { | |||
enum { | enum { | |||
ARG_READY = 0x100, | ARG_READY = 0x100, | |||
ARG_VERSION, | ARG_VERSION, | |||
ARG_PID, | ARG_PID, | |||
ARG_STATUS, | ARG_STATUS, | |||
ARG_BOOTED, | ARG_BOOTED, | |||
skipping to change at line 93 | skipping to change at line 90 | |||
int c; | int c; | |||
assert(argc >= 0); | assert(argc >= 0); | |||
assert(argv); | assert(argv); | |||
while ((c = getopt_long(argc, argv, "h", options, NULL)) >= 0) { | while ((c = getopt_long(argc, argv, "h", options, NULL)) >= 0) { | |||
switch (c) { | switch (c) { | |||
case 'h': | case 'h': | |||
return help(); | help(); | |||
return 0; | ||||
case ARG_VERSION: | case ARG_VERSION: | |||
puts(PACKAGE_STRING); | puts(PACKAGE_STRING); | |||
puts(SYSTEMD_FEATURES); | puts(SYSTEMD_FEATURES); | |||
return 0; | return 0; | |||
case ARG_READY: | case ARG_READY: | |||
arg_ready = true; | arg_ready = true; | |||
break; | break; | |||
End of changes. 4 change blocks. | ||||
6 lines changed or deleted | 4 lines changed or added | |||
This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/ |