summaryrefslogtreecommitdiff
path: root/src/libostree/ostree-bootloader-uboot.c
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2014-04-03 21:08:03 -0400
committerColin Walters <walters@verbum.org>2014-04-03 21:08:03 -0400
commitcc8bacf8b4b37196dd07cdf987365872b735e639 (patch)
treea9010a6cb9544a768c31953c5d4a4c26a5c55bab /src/libostree/ostree-bootloader-uboot.c
parentac40de57734ad2241279fffba8860fdf588e8401 (diff)
downloadostree-cc8bacf8b4b37196dd07cdf987365872b735e639.tar.gz
bootloaders: Always write out bootloader config file
There was an attempted optimization to only write if changed, but this is broken - we always write the bootloader config into a new directory. In theory we should only be writing if it changed, but let's not do a broken optimization.
Diffstat (limited to 'src/libostree/ostree-bootloader-uboot.c')
-rw-r--r--src/libostree/ostree-bootloader-uboot.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/libostree/ostree-bootloader-uboot.c b/src/libostree/ostree-bootloader-uboot.c
index 91d051c4..c56d5ac0 100644
--- a/src/libostree/ostree-bootloader-uboot.c
+++ b/src/libostree/ostree-bootloader-uboot.c
@@ -125,14 +125,11 @@ _ostree_bootloader_uboot_write_config (OstreeBootloader *bootloader,
new_config_contents = _ostree_sysroot_join_lines (new_lines);
- if (strcmp (new_config_contents, config_contents) != 0)
- {
- if (!g_file_replace_contents (new_config_path, new_config_contents,
- strlen (new_config_contents),
- NULL, FALSE, G_FILE_CREATE_NONE,
- NULL, cancellable, error))
- return FALSE;
- }
+ if (!g_file_replace_contents (new_config_path, new_config_contents,
+ strlen (new_config_contents),
+ NULL, FALSE, G_FILE_CREATE_NONE,
+ NULL, cancellable, error))
+ return FALSE;
return TRUE;
}