libglnx porting: Port "load utf8 file" contents API callers
Closes: #312 Approved by: giuseppe
This commit is contained in:
parent
4929ab4033
commit
33047d5d4f
|
|
@ -138,7 +138,8 @@ _ostree_bootloader_syslinux_write_config (OstreeBootloader *bootloader,
|
||||||
bootversion);
|
bootversion);
|
||||||
|
|
||||||
/* This should follow the symbolic link to the current 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)
|
if (!config_contents)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -113,7 +113,8 @@ _ostree_bootloader_uboot_write_config (OstreeBootloader *bootloader,
|
||||||
g_autoptr(GPtrArray) new_lines = NULL;
|
g_autoptr(GPtrArray) new_lines = NULL;
|
||||||
|
|
||||||
/* This should follow the symbolic link to the current 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)
|
if (!config_contents)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -254,7 +254,8 @@ ot_gfile_load_contents_utf8_allow_noent (GFile *path,
|
||||||
GError *temp_error = NULL;
|
GError *temp_error = NULL;
|
||||||
g_autofree char *ret_contents = 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 (!ret_contents)
|
||||||
{
|
{
|
||||||
if (g_error_matches (temp_error, G_IO_ERROR, G_IO_ERROR_NOT_FOUND))
|
if (g_error_matches (temp_error, G_IO_ERROR, G_IO_ERROR_NOT_FOUND))
|
||||||
|
|
|
||||||
|
|
@ -101,7 +101,8 @@ ot_editor_prompt (OstreeRepo *repo,
|
||||||
goto out;
|
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:
|
out:
|
||||||
if (file)
|
if (file)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue