chiark / gitweb /
auto-getty: rework auto console getty logic to work in conjunction with single user...
[elogind.git] / src / hostname-setup.c
index 24e0f9d9fe84819cd720b1ec314c662b10f42771..f52e38aef23739b648bc192af0da7bb63ce0bdf3 100644 (file)
@@ -1,4 +1,4 @@
-/*-*- Mode: C; c-basic-offset: 8 -*-*/
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
 
 /***
   This file is part of systemd.
@@ -101,10 +101,11 @@ static int read_hostname(char **hn) {
                 }
 
                 *hn = k;
-                break;
+                r = 0;
+                goto finish;
         }
 
-        r = 0;
+        r = -ENOENT;
 
 finish:
         fclose(f);