summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/core/service.c3
-rw-r--r--src/systemctl/systemctl.c9
2 files changed, 6 insertions, 6 deletions
diff --git a/src/core/service.c b/src/core/service.c
index 3b3f956380..67cf63099a 100644
--- a/src/core/service.c
+++ b/src/core/service.c
@@ -1254,8 +1254,7 @@ static int service_load(Unit *u) {
s->notify_access = NOTIFY_MAIN;
if (s->type == SERVICE_DBUS || s->bus_name) {
- r = unit_add_two_dependencies_by_name(u, UNIT_AFTER, UNIT_REQUIRES,
- SPECIAL_DBUS_SOCKET, NULL, true);
+ r = unit_add_two_dependencies_by_name(u, UNIT_AFTER, UNIT_REQUIRES, SPECIAL_DBUS_SOCKET, NULL, true);
if (r < 0)
return r;
}
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
index 9a76349b40..3e6a6883f6 100644
--- a/src/systemctl/systemctl.c
+++ b/src/systemctl/systemctl.c
@@ -3743,20 +3743,19 @@ static int show_all(
}
static int cat(sd_bus *bus, char **args) {
+ _cleanup_free_ char *unit = NULL, *n = NULL;
int r = 0;
char **name;
- _cleanup_free_ char *unit = NULL, *n = NULL;
-
assert(bus);
assert(args);
pager_open_if_enabled();
STRV_FOREACH(name, args+1) {
- _cleanup_free_ char *fragment_path = NULL;
+ _cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL;
_cleanup_strv_free_ char **dropin_paths = NULL;
- sd_bus_error error;
+ _cleanup_free_ char *fragment_path = NULL;
char **path;
n = unit_name_mangle(*name);
@@ -3800,6 +3799,7 @@ static int cat(sd_bus *bus, char **args) {
if (!isempty(fragment_path)) {
fprintf(stdout, "# %s\n", fragment_path);
fflush(stdout);
+
r = sendfile_full(STDOUT_FILENO, fragment_path);
if (r < 0) {
log_warning("Failed to cat %s: %s", fragment_path, strerror(-r));
@@ -3812,6 +3812,7 @@ static int cat(sd_bus *bus, char **args) {
isempty(fragment_path) && path == dropin_paths ? "" : "\n",
*path);
fflush(stdout);
+
r = sendfile_full(STDOUT_FILENO, *path);
if (r < 0) {
log_warning("Failed to cat %s: %s", *path, strerror(-r));