]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
systemctl: fix incorrect "need reload" on cat (#4535)
authorLucas Werkmeister <mail@lucaswerkmeister.de>
Wed, 2 Nov 2016 22:12:03 +0000 (23:12 +0100)
committerLennart Poettering <lennart@poettering.net>
Wed, 2 Nov 2016 22:12:03 +0000 (16:12 -0600)
Reported by @evverx in #4493.

src/systemctl/systemctl.c

index d311bbec1a086bc02089cb84561adfa7062a5758..b6d66aa3631ac871346d469373eef03e69da69a5 100644 (file)
@@ -5272,7 +5272,7 @@ static int cat(int argc, char *argv[], void *userdata) {
                 else
                         puts("");
 
-                if (need_daemon_reload(bus, *name))
+                if (need_daemon_reload(bus, *name) > 0) /* ignore errors (<0), this is informational output */
                         fprintf(stderr,
                                 "%s# Warning: %s changed on disk, the version systemd has loaded is outdated.\n"
                                 "%s# This output shows the current version of the unit's original fragment and drop-in files.\n"