[systemd-commits] src/core
Lennart Poettering
lennart at kemper.freedesktop.org
Thu Sep 13 10:31:51 PDT 2012
src/core/manager.c | 8 ++++----
src/core/path.c | 6 ++++--
2 files changed, 8 insertions(+), 6 deletions(-)
New commits:
commit 7ceba241344b2126e5e9cb46929dbbb591f04c49
Author: Lennart Poettering <lennart at poettering.net>
Date: Thu Sep 13 19:29:46 2012 +0200
manager: fix the build
diff --git a/src/core/manager.c b/src/core/manager.c
index 23d8ca3..b0357b7 100644
--- a/src/core/manager.c
+++ b/src/core/manager.c
@@ -2013,7 +2013,7 @@ bool manager_unit_pending_inactive(Manager *m, const char *name) {
}
void manager_check_finished(Manager *m) {
- char firmware[FORMAT_TIMESPAN_MAX], loader[FORMAT_TIMESPAN_MAX], userspace[FORMAT_TIMESPAN_MAX], initrd[FORMAT_TIMESPAN_MAX], kernel[FORMAT_TIMESPAN_MAX], sum[FORMAT_TIMESPAN_MAX];
+ char userspace[FORMAT_TIMESPAN_MAX], initrd[FORMAT_TIMESPAN_MAX], kernel[FORMAT_TIMESPAN_MAX], sum[FORMAT_TIMESPAN_MAX];
usec_t firmware_usec, loader_usec, kernel_usec, initrd_usec, userspace_usec, total_usec;
assert(m);
@@ -2039,10 +2039,10 @@ void manager_check_finished(Manager *m) {
* m->loader_usec.monotonic should be considered
* negative values. */
- firmware_usec = m->firmware_usec.monotonic - m->loader_timestamp.monotonic;
- loader_usec = m->loader_usec.monotonic - m->kernel_usec.monotonic;
+ firmware_usec = m->firmware_timestamp.monotonic - m->loader_timestamp.monotonic;
+ loader_usec = m->loader_timestamp.monotonic - m->kernel_timestamp.monotonic;
userspace_usec = m->finish_timestamp.monotonic - m->userspace_timestamp.monotonic;
- total_usec = m->firmware_usec.monotonic + m->finish_timestamp.monotonic;
+ total_usec = m->firmware_timestamp.monotonic + m->finish_timestamp.monotonic;
if (dual_timestamp_is_set(&m->initrd_timestamp)) {
diff --git a/src/core/path.c b/src/core/path.c
index 42dd5da..e3defeb 100644
--- a/src/core/path.c
+++ b/src/core/path.c
@@ -73,14 +73,16 @@ int path_spec_watch(PathSpec *s, Unit *u) {
goto fail;
}
- if ((s->primary_wd = inotify_add_watch(s->inotify_fd, k, flags_table[s->type])) >= 0)
+ s->primary_wd = inotify_add_watch(s->inotify_fd, k, flags_table[s->type]);
+ if (s->primary_wd >= 0)
exists = true;
do {
int flags;
/* This assumes the path was passed through path_kill_slashes()! */
- if (!(slash = strrchr(k, '/')))
+ slash = strrchr(k, '/');
+ if (!slash)
break;
/* Trim the path at the last slash. Keep the slash if it's the root dir. */
More information about the systemd-commits
mailing list