]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/sulogin-shell/sulogin-shell.c
tree-wide: shorten error logging a bit
[thirdparty/systemd.git] / src / sulogin-shell / sulogin-shell.c
index 33dc07c5bdec5b8e9abb6c36aed731d0a8115242..5db3592d6fd225fbacf3c909a735fe3d581d2be4 100644 (file)
@@ -1,21 +1,6 @@
 /* SPDX-License-Identifier: LGPL-2.1+ */
 /***
-  This file is part of systemd.
-
-  Copyright 2017 Felipe Sateler
-
-  systemd is free software; you can redistribute it and/or modify it
-  under the terms of the GNU Lesser General Public License as published by
-  the Free Software Foundation; either version 2.1 of the License, or
-  (at your option) any later version.
-
-  systemd is distributed in the hope that it will be useful, but
-  WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-  Lesser General Public License for more details.
-
-  You should have received a copy of the GNU Lesser General Public License
-  along with systemd; If not, see <http://www.gnu.org/licenses/>.
+  Copyright © 2017 Felipe Sateler
 ***/
 
 #include <errno.h>
@@ -74,9 +59,9 @@ static int start_default_target(sd_bus *bus) {
                                "ss", "default.target", "isolate");
 
         if (r < 0)
-                log_error("Failed to start default target: %s", bus_error_message(&error, r));
+                return log_error_errno(r, "Failed to start default target: %s", bus_error_message(&error, r));
 
-        return r;
+        return 0;
 }
 
 static int fork_wait(const char* const cmdline[]) {