[systemd-commits] 2 commits - fixme src/sd-daemon.c src/util.c
Lennart Poettering
lennart at kemper.freedesktop.org
Fri Aug 6 12:34:21 PDT 2010
fixme | 6 ++++--
src/sd-daemon.c | 2 +-
src/util.c | 6 ++++++
3 files changed, 11 insertions(+), 3 deletions(-)
New commits:
commit 4502d22cb8a96d9059b02861b8074e4fadf2cab2
Author: Lennart Poettering <lennart at poettering.net>
Date: Fri Aug 6 21:33:53 2010 +0200
util: when formatting timestamps return '0' for 0 timestamps instead of empty string
diff --git a/src/util.c b/src/util.c
index ee7749b..7281b70 100644
--- a/src/util.c
+++ b/src/util.c
@@ -1936,6 +1936,12 @@ char *format_timespan(char *buf, size_t l, usec_t t) {
if (t == (usec_t) -1)
return NULL;
+ if (t == 0) {
+ snprintf(p, l, "0");
+ p[l-1] = 0;
+ return p;
+ }
+
/* The result of this function can be parsed with parse_usec */
for (i = 0; i < ELEMENTSOF(table); i++) {
commit c593cfe164bbdd063b8e8504be14f758b1f0a8c3
Author: Lennart Poettering <lennart at poettering.net>
Date: Fri Aug 6 21:33:20 2010 +0200
sd-daemon: fix compilation on old systems lacking SOCK_CLOEXEC
diff --git a/fixme b/fixme
index 55303f4..9190532 100644
--- a/fixme
+++ b/fixme
@@ -73,12 +73,14 @@
* if a service fails too often, make the service enter maintainence mode, and the socket, too.
-* send cgroup msg directly
-
* don't show file not found msgs for irrelevant units
+* getty doesn't respawn
+
External:
+* sysv functions should color when stdout is tty, not stdin
+
* agetty should not modify baudrate
* ck logging, ssh readahead
diff --git a/src/sd-daemon.c b/src/sd-daemon.c
index 3bb258d..1197372 100644
--- a/src/sd-daemon.c
+++ b/src/sd-daemon.c
@@ -325,7 +325,7 @@ int sd_is_socket_unix(int fd, int type, int listening, const char *path, size_t
}
int sd_notify(int unset_environment, const char *state) {
-#if defined(DISABLE_SYSTEMD) || !defined(__linux__)
+#if defined(DISABLE_SYSTEMD) || !defined(__linux__) || !defined(SOCK_CLOEXEC)
return 0;
#else
int fd = -1, r;
More information about the systemd-commits
mailing list