chiark / gitweb /
udev link-config: add asserts to silence scan-build
[elogind.git] / src / systemctl / systemctl.c
index 3e6a6883f6ec2509b5532a7947f83d53bd8f6008..aab92c466f2641e0d662ca7eab32acc1cc573914 100644 (file)
@@ -3797,7 +3797,10 @@ static int cat(sd_bus *bus, char **args) {
                 }
 
                 if (!isempty(fragment_path)) {
-                        fprintf(stdout, "# %s\n", fragment_path);
+                        fprintf(stdout, "%s# %s%s\n",
+                                ansi_highlight_blue(),
+                                fragment_path,
+                                ansi_highlight_off());
                         fflush(stdout);
 
                         r = sendfile_full(STDOUT_FILENO, fragment_path);
@@ -3821,7 +3824,7 @@ static int cat(sd_bus *bus, char **args) {
                 }
         }
 
-        return r;
+        return r < 0 ? r : 0;
 }
 
 static int show(sd_bus *bus, char **args) {