diff options
author | Colin Walters <walters@verbum.org> | 2016-05-29 13:23:04 -0400 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2016-05-30 11:33:28 +0000 |
commit | 33047d5d4fd135f3976484be30ed7dbb9c692c67 (patch) | |
tree | 389288e91b6673dba88fd4a8a6188b37168825bb | |
parent | 4929ab4033894d0aaf1987ebc07d7ccbe23323e1 (diff) | |
download | ostree-33047d5d4fd135f3976484be30ed7dbb9c692c67.tar.gz |
libglnx porting: Port "load utf8 file" contents API callers
Closes: #312
Approved by: giuseppe
-rw-r--r-- | src/libostree/ostree-bootloader-syslinux.c | 3 | ||||
-rw-r--r-- | src/libostree/ostree-bootloader-uboot.c | 3 | ||||
-rw-r--r-- | src/libotutil/ot-gio-utils.c | 3 | ||||
-rw-r--r-- | src/ostree/ot-editor.c | 3 |
4 files changed, 8 insertions, 4 deletions
diff --git a/src/libostree/ostree-bootloader-syslinux.c b/src/libostree/ostree-bootloader-syslinux.c index 16951629..05cb173e 100644 --- a/src/libostree/ostree-bootloader-syslinux.c +++ b/src/libostree/ostree-bootloader-syslinux.c @@ -138,7 +138,8 @@ _ostree_bootloader_syslinux_write_config (OstreeBootloader *bootloader, bootversion); /* This should follow the symbolic link to the current bootversion. */ - config_contents = gs_file_load_contents_utf8 (self->config_path, cancellable, error); + config_contents = glnx_file_get_contents_utf8_at (AT_FDCWD, gs_file_get_path_cached (self->config_path), NULL, + cancellable, error); if (!config_contents) goto out; diff --git a/src/libostree/ostree-bootloader-uboot.c b/src/libostree/ostree-bootloader-uboot.c index f67e9bdb..f95ea843 100644 --- a/src/libostree/ostree-bootloader-uboot.c +++ b/src/libostree/ostree-bootloader-uboot.c @@ -113,7 +113,8 @@ _ostree_bootloader_uboot_write_config (OstreeBootloader *bootloader, g_autoptr(GPtrArray) new_lines = NULL; /* This should follow the symbolic link to the current bootversion. */ - config_contents = gs_file_load_contents_utf8 (self->config_path, cancellable, error); + config_contents = glnx_file_get_contents_utf8_at (AT_FDCWD, gs_file_get_path_cached (self->config_path), NULL, + cancellable, error); if (!config_contents) return FALSE; diff --git a/src/libotutil/ot-gio-utils.c b/src/libotutil/ot-gio-utils.c index 9b8b0dce..103f6edd 100644 --- a/src/libotutil/ot-gio-utils.c +++ b/src/libotutil/ot-gio-utils.c @@ -254,7 +254,8 @@ ot_gfile_load_contents_utf8_allow_noent (GFile *path, GError *temp_error = NULL; g_autofree char *ret_contents = NULL; - ret_contents = gs_file_load_contents_utf8 (path, cancellable, &temp_error); + ret_contents = glnx_file_get_contents_utf8_at (AT_FDCWD, gs_file_get_path_cached (path), NULL, + cancellable, &temp_error); if (!ret_contents) { if (g_error_matches (temp_error, G_IO_ERROR, G_IO_ERROR_NOT_FOUND)) diff --git a/src/ostree/ot-editor.c b/src/ostree/ot-editor.c index 2e045844..66c6e7be 100644 --- a/src/ostree/ot-editor.c +++ b/src/ostree/ot-editor.c @@ -101,7 +101,8 @@ ot_editor_prompt (OstreeRepo *repo, goto out; } - ret = gs_file_load_contents_utf8 (file, cancellable, error); + ret = glnx_file_get_contents_utf8_at (AT_FDCWD, gs_file_get_path_cached (file), NULL, + cancellable, error); out: if (file) |