From: Vladimir Serbinenko Date: Mon, 16 Feb 2015 09:54:20 +0000 (+0100) Subject: syslinux_parse: Always output comments even if no entries are found. X-Git-Tag: 2.02-beta3~434 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b23635fcff62b68b6d5bfde541350095d743a13a;p=thirdparty%2Fgrub.git syslinux_parse: Always output comments even if no entries are found. --- diff --git a/grub-core/lib/syslinux_parse.c b/grub-core/lib/syslinux_parse.c index 2c874b1fa..46eff1e5d 100644 --- a/grub-core/lib/syslinux_parse.c +++ b/grub-core/lib/syslinux_parse.c @@ -1430,6 +1430,13 @@ config_file (struct output_buffer *outbuf, print_string ("\n"); } + if (menu.comments) + { + err = print (outbuf, menu.comments, grub_strlen (menu.comments)); + if (err) + return err; + } + if (menu.timeout == 0 && menu.entries && menu.def) { err = print_entry (outbuf, &menu, menu.def); @@ -1446,12 +1453,6 @@ config_file (struct output_buffer *outbuf, if (err) return err; print_string ("\n"); - if (menu.comments) - { - err = print (outbuf, menu.comments, grub_strlen (menu.comments)); - if (err) - return err; - } if (menu.def) {