fprintf(f, "Environment=DBUS_STARTER_BUS_TYPE=%s\n", type);
if (streq(type, "system"))
- fprintf(f, "Environment=DBUS_STARTER_ADDRESS=" DEFAULT_SYSTEM_BUS_PATH "\n");
+ fprintf(f, "Environment=DBUS_STARTER_ADDRESS=" DEFAULT_SYSTEM_BUS_ADDRESS "\n");
else if (streq(type, "session")) {
char *run;
return -EINVAL;
}
- fprintf(f, "Environment=DBUS_STARTER_ADDRESS="KERNEL_USER_BUS_FMT ";" UNIX_USER_BUS_FMT "\n",
+ fprintf(f, "Environment=DBUS_STARTER_ADDRESS="KERNEL_USER_BUS_ADDRESS_FMT ";" UNIX_USER_BUS_ADDRESS_FMT "\n",
getuid(), run);
}
}
r = fflush_and_check(f);
- if (r < 0) {
- log_error_errno(-r, "Failed to write %s: %m", a);
- return r;
- }
+ if (r < 0)
+ return log_error_errno(r, "Failed to write %s: %m", a);
fclose(f);
f = NULL;
service);
r = fflush_and_check(f);
- if (r < 0) {
- log_error_errno(-r, "Failed to write %s: %m", b);
- return r;
- }
+ if (r < 0)
+ return log_error_errno(r, "Failed to write %s: %m", b);
lnk = strjoin(arg_dest_late, "/" SPECIAL_BUSNAMES_TARGET ".wants/", name, ".busname", NULL);
if (!lnk)
path = "/usr/share/dbus-1/system-services";
type = "system";
units = SYSTEM_DATA_UNIT_PATH;
- } else {
- log_error_errno(-r, "Failed to determine whether we are running as user or system instance: %m");
- return r;
- }
+ } else
+ return log_error_errno(r, "Failed to determine whether we are running as user or system instance: %m");
r = parse_dbus_fragments(path, type);