/* SPDX-License-Identifier: LGPL-2.1+ */
-/***
- This file is part of systemd.
-
- Copyright 2013 Lennart Poettering
-***/
#include <errno.h>
#include <fcntl.h>
/* Yes, heuristics! But we can change this check
* should it turn out to not be sufficient */
- if (endswith(name, "Timestamp") || STR_IN_SET(name, "NextElapseUSecRealtime", "LastTriggerUSec")) {
+ if (endswith(name, "Timestamp") ||
+ STR_IN_SET(name, "NextElapseUSecRealtime", "LastTriggerUSec", "TimeUSec", "RTCTimeUSec")) {
char timestamp[FORMAT_TIMESTAMP_MAX];
const char *t;
return r;
if (flags & BUS_MAP_BOOLEAN_AS_BOOL)
- * (bool*) userdata = !!b;
+ *(bool*) userdata = b;
else
- * (int*) userdata = b;
+ *(int*) userdata = b;
return 0;
}
#if 0 /// elogind does not support a user bus
if (user)
r = sd_bus_default_user(&bus);
-#endif // 0
else {
if (sd_booted() <= 0) {
/* Print a friendly message when the local system is actually not running systemd as PID 1. */
- log_error("System has not been booted with elogind as init system (PID 1). Can't operate.");
+ log_error("System has not been booted with systemd as init system (PID 1). Can't operate.");
return -EHOSTDOWN;
}
+#endif // 0
r = sd_bus_default_system(&bus);
+#if 0 /// No closing bracket with elogind... Ain't we simple? ;-)
}
+#endif // 0
break;
case BUS_TRANSPORT_REMOTE:
if (r < 0)
return r;
- *(bool *) userdata = !!b;
+ *(bool*) userdata = b;
return 0;
}