chiark / gitweb /
service: hide output of sysv scripts if quiet is passed on the kernel cmdline
[elogind.git] / src / hostname-setup.c
index 24e0f9d9fe84819cd720b1ec314c662b10f42771..e0257166d8c267094c918d5f419a1890fabced34 100644 (file)
@@ -101,10 +101,11 @@ static int read_hostname(char **hn) {
                 }
 
                 *hn = k;
-                break;
+                r = 0;
+                goto finish;
         }
 
-        r = 0;
+        r = -ENOENT;
 
 finish:
         fclose(f);