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 3a17c629cad737c786394895eef6467933f897f0..40e8bd3db52bc1cb3d6375763b2c6838174cb7a2 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 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);