chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
sd-bus: correct spacing near eol in code comments
[elogind.git]
/
src
/
libsystemd
/
sd-bus
/
bus-util.c
diff --git
a/src/libsystemd/sd-bus/bus-util.c
b/src/libsystemd/sd-bus/bus-util.c
index 4b5c1a6d36b5463edaf0a363f38e1f9d09b57319..0f1a89c8e17f0371814fad6db698549811f3bf0e 100644
(file)
--- a/
src/libsystemd/sd-bus/bus-util.c
+++ b/
src/libsystemd/sd-bus/bus-util.c
@@
-521,7
+521,7
@@
int bus_open_system_systemd(sd_bus **_bus) {
if (r < 0)
return r;
if (r < 0)
return r;
- r = sd_bus_set_address(bus, KERNEL_SYSTEM_BUS_
PATH
);
+ r = sd_bus_set_address(bus, KERNEL_SYSTEM_BUS_
ADDRESS
);
if (r < 0)
return r;
if (r < 0)
return r;
@@
-574,7
+574,7
@@
int bus_open_user_systemd(sd_bus **_bus) {
if (r < 0)
return r;
if (r < 0)
return r;
- if (asprintf(&bus->address, KERNEL_USER_BUS_FMT, getuid()) < 0)
+ if (asprintf(&bus->address, KERNEL_USER_BUS_
ADDRESS_
FMT, getuid()) < 0)
return -ENOMEM;
bus->bus_client = true;
return -ENOMEM;
bus->bus_client = true;
@@
-1263,13
+1263,11
@@
int bus_property_get_ulong(
#endif
int bus_log_parse_error(int r) {
#endif
int bus_log_parse_error(int r) {
- log_error_errno(-r, "Failed to parse bus message: %m");
- return r;
+ return log_error_errno(r, "Failed to parse bus message: %m");
}
int bus_log_create_error(int r) {
}
int bus_log_create_error(int r) {
- log_error_errno(-r, "Failed to create bus message: %m");
- return r;
+ return log_error_errno(r, "Failed to create bus message: %m");
}
int bus_parse_unit_info(sd_bus_message *message, UnitInfo *u) {
}
int bus_parse_unit_info(sd_bus_message *message, UnitInfo *u) {
@@
-1374,7
+1372,8
@@
int bus_append_unit_property_assignment(sd_bus_message *m, const char *assignmen
if (STR_IN_SET(field,
"CPUAccounting", "MemoryAccounting", "BlockIOAccounting",
if (STR_IN_SET(field,
"CPUAccounting", "MemoryAccounting", "BlockIOAccounting",
- "SendSIGHUP", "SendSIGKILL")) {
+ "SendSIGHUP", "SendSIGKILL",
+ "WakeSystem")) {
r = parse_boolean(eq);
if (r < 0) {
r = parse_boolean(eq);
if (r < 0) {
@@
-1535,6
+1534,17
@@
int bus_append_unit_property_assignment(sd_bus_message *m, const char *assignmen
r = sd_bus_message_append(m, "v", "i", sig);
r = sd_bus_message_append(m, "v", "i", sig);
+ } else if (streq(field, "AccuracySec")) {
+ usec_t u;
+
+ r = parse_sec(eq, &u);
+ if (r < 0) {
+ log_error("Failed to parse %s value %s", field, eq);
+ return -EINVAL;
+ }
+
+ r = sd_bus_message_append(m, "v", "t", u);
+
} else {
log_error("Unknown assignment %s.", assignment);
return -EINVAL;
} else {
log_error("Unknown assignment %s.", assignment);
return -EINVAL;