chiark / gitweb /
hostname: properly deal with unset hostname in fedora configuration
authorLennart Poettering <lennart@poettering.net>
Tue, 20 Jul 2010 19:34:25 +0000 (21:34 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 20 Jul 2010 19:34:25 +0000 (21:34 +0200)
fixme
src/hostname-setup.c

diff --git a/fixme b/fixme
index 3a17c62..40e8bd3 100644 (file)
--- a/fixme
+++ b/fixme
@@ -38,6 +38,7 @@
 * place /etc/inittab with explaining blurb.
 
 * In command lines, support both "$FOO" and $FOO
+
 * /etc must always take precedence even if we follow symlinks!
 
 * vielleicht implizit immer auf syslog dependen?
@@ -48,8 +49,6 @@
 
 * set_put(), hashmap_put() return values checken. i.e. == 0 macht kein free()!
 
-* crash on missing hostname
-
 * fix merging in .swap units
 
 * pahole
index 24e0f9d..e025716 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);