chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
man: we don't have 'Wanted' dependency
[elogind.git]
/
src
/
activate
/
activate.c
diff --git
a/src/activate/activate.c
b/src/activate/activate.c
index 8c582739976a2e4116b99cb1721c95083575db1c..0a1df37f353d8e9e72bbcc85f8335de4faac04bb 100644
(file)
--- a/
src/activate/activate.c
+++ b/
src/activate/activate.c
@@
-27,7
+27,7
@@
#include <sys/wait.h>
#include <getopt.h>
#include <sys/wait.h>
#include <getopt.h>
-#include
<systemd/sd-daemon.h>
+#include
"systemd/sd-daemon.h"
#include "socket-util.h"
#include "build.h"
#include "socket-util.h"
#include "build.h"
@@
-242,7
+242,7
@@
static int launch1(const char* child, char** argv, char **env, int fd) {
static int do_accept(const char* name, char **argv, char **envp, int fd) {
_cleanup_free_ char *local = NULL, *peer = NULL;
static int do_accept(const char* name, char **argv, char **envp, int fd) {
_cleanup_free_ char *local = NULL, *peer = NULL;
-
int fd2
;
+
_cleanup_close_ int fd2 = -1
;
fd2 = accept(fd, NULL, NULL);
if (fd2 < 0) {
fd2 = accept(fd, NULL, NULL);
if (fd2 < 0) {
@@
-279,7
+279,7
@@
static int install_chld_handler(void) {
return r;
}
return r;
}
-static
int
help(void) {
+static
void
help(void) {
printf("%s [OPTIONS...]\n\n"
"Listen on sockets and launch child on connection.\n\n"
"Options:\n"
printf("%s [OPTIONS...]\n\n"
"Listen on sockets and launch child on connection.\n\n"
"Options:\n"
@@
-290,10
+290,7
@@
static int help(void) {
" --version Print version string and exit\n"
"\n"
"Note: file descriptors from sd_listen_fds() will be passed through.\n"
" --version Print version string and exit\n"
"\n"
"Note: file descriptors from sd_listen_fds() will be passed through.\n"
- , program_invocation_short_name
- );
-
- return 0;
+ , program_invocation_short_name);
}
static int parse_argv(int argc, char *argv[]) {
}
static int parse_argv(int argc, char *argv[]) {
@@
-319,7
+316,8
@@
static int parse_argv(int argc, char *argv[]) {
while ((c = getopt_long(argc, argv, "+hl:aE:", options, NULL)) >= 0)
switch(c) {
case 'h':
while ((c = getopt_long(argc, argv, "+hl:aE:", options, NULL)) >= 0)
switch(c) {
case 'h':
- return help();
+ help();
+ return 0;
case ARG_VERSION:
puts(PACKAGE_STRING);
case ARG_VERSION:
puts(PACKAGE_STRING);
@@
-354,7
+352,7
@@
static int parse_argv(int argc, char *argv[]) {
}
if (optind == argc) {
}
if (optind == argc) {
- log_error("
Usage: %s [OPTION...] PROGRAM [OPTION...]
",
+ log_error("
%s: command to execute is missing.
",
program_invocation_short_name);
return -EINVAL;
}
program_invocation_short_name);
return -EINVAL;
}