[systemd-commits] fixme src/hostname-setup.c

Lennart Poettering lennart at kemper.freedesktop.org
Tue Jul 20 12:34:34 PDT 2010


 fixme                |    3 +--
 src/hostname-setup.c |    5 +++--
 2 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 84b00965b7c2d0fb41c061895a85b383cbc1c89d
Author: Lennart Poettering <lennart at poettering.net>
Date:   Tue Jul 20 21:34:25 2010 +0200

    hostname: properly deal with unset hostname in fedora configuration

diff --git a/fixme b/fixme
index 3a17c62..40e8bd3 100644
--- 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
diff --git a/src/hostname-setup.c b/src/hostname-setup.c
index 24e0f9d..e025716 100644
--- a/src/hostname-setup.c
+++ b/src/hostname-setup.c
@@ -101,10 +101,11 @@ static int read_hostname(char **hn) {
                 }
 
                 *hn = k;
-                break;
+                r = 0;
+                goto finish;
         }
 
-        r = 0;
+        r = -ENOENT;
 
 finish:
         fclose(f);


More information about the systemd-commits mailing list