summaryrefslogtreecommitdiff
path: root/src/libostree/ostree-bootloader-syslinux.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2014-11-09 19:54:37 -0500
committerMatthew Barnes <mbarnes@redhat.com>2014-11-10 21:31:32 -0500
commit5c9e83c02caa429045d26e78b932bc54e853ec16 (patch)
tree1a9f246b5c133db28683632156d72e5a065a258d /src/libostree/ostree-bootloader-syslinux.c
parentbbd3fd7a228751ad44ecd24bf57f22f29e97a847 (diff)
downloadostree-5c9e83c02caa429045d26e78b932bc54e853ec16.tar.gz
syslinux: Adapt to bootloader UI changes
This was a side-effect of the bootloader UI changes in bug 739416, but should now be sufficiently future-proofed with code comments.
Diffstat (limited to 'src/libostree/ostree-bootloader-syslinux.c')
-rw-r--r--src/libostree/ostree-bootloader-syslinux.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/libostree/ostree-bootloader-syslinux.c b/src/libostree/ostree-bootloader-syslinux.c
index 86b66fa2..6c2b4417 100644
--- a/src/libostree/ostree-bootloader-syslinux.c
+++ b/src/libostree/ostree-bootloader-syslinux.c
@@ -206,8 +206,14 @@ _ostree_bootloader_syslinux_write_config (OstreeBootloader *bootloader,
(g_str_has_prefix (line, "DEFAULT ")))
{
saw_default = TRUE;
- if (g_str_has_prefix (line, "DEFAULT ostree:"))
- regenerate_default = TRUE;
+ /* XXX Searching for patterns in the title is rather brittle,
+ * but this hack is at least noted in the code that builds
+ * the title to hopefully avoid regressions. */
+ if (g_str_has_prefix (line, "DEFAULT ostree:") || /* old format */
+ strstr (line, "(ostree") != NULL) /* new format */
+ {
+ regenerate_default = TRUE;
+ }
skip = TRUE;
}