On Mon, May 18, 2015 at 11:33 AM, Martin Pitt <martin.p...@ubuntu.com> wrote: > Hello all, > > We got a report [1] that systemd doesn't allow comments in > /etc/hostname. If there is a comment, your host name ends up being > "# comment". But the original hostname(1) tool documents that comments > are allowed, thus in the sysvinit/upstart world these worked fine. > Earlier versions of cloud-init also produced a comment there. > > This currently uses read_full_file() and strv_split_newlines() which > is relatively expensive (although, in most cases there will only be > one line). In cases like these should we rather use an fgets() loop?
I think FOREACH_LINE would make this more readable. > Given that host names are limited to 64 bytes (HOST_NAME_MAX) this > could be written more efficiently. _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel