[systemd-devel] [PATCH] service: remove unneccesary Socket.got_socket_fd
Shawn Landden
shawn at churchofgit.com
Wed Nov 20 00:35:04 PST 2013
---
src/core/service.c | 3 +--
src/core/service.h | 2 --
2 files changed, 1 insertion(+), 4 deletions(-)
diff --git a/src/core/service.c b/src/core/service.c
index c0ee114..24f7a42 100644
--- a/src/core/service.c
+++ b/src/core/service.c
@@ -2812,7 +2812,7 @@ _pure_ static bool service_check_snapshot(Unit *u) {
assert(s);
- return !s->got_socket_fd;
+ return (s->socket_fd < 0);
}
static int service_retry_pid_file(Service *s) {
@@ -3695,7 +3695,6 @@ int service_set_socket_fd(Service *s, int fd, Socket *sock) {
return -EAGAIN;
s->socket_fd = fd;
- s->got_socket_fd = true;
unit_ref_set(&s->accept_socket, UNIT(sock));
diff --git a/src/core/service.h b/src/core/service.h
index 37fa6ff..40c3a85 100644
--- a/src/core/service.h
+++ b/src/core/service.h
@@ -26,7 +26,6 @@ typedef struct Service Service;
#include "unit.h"
#include "path.h"
#include "ratelimit.h"
-#include "service.h"
#include "kill.h"
#include "exit-status.h"
@@ -170,7 +169,6 @@ struct Service {
bool main_pid_alien:1;
bool bus_name_good:1;
bool forbid_restart:1;
- bool got_socket_fd:1;
bool start_timeout_defined:1;
#ifdef HAVE_SYSV_COMPAT
bool is_sysv:1;
--
1.8.4.3
More information about the systemd-devel
mailing list