Update libglnx, port some uses to newer APIs
Mostly for the latest `-Wmaybe-uninitialized` fix, but while here also port some places to newer APIs. Update submodule: libglnx Closes: #1027 Approved by: jlebon
This commit is contained in:
1 parent
8456fd5057
commit
0985158be7
8 files changed
+27
-42
No files matched your search
@@ -420,15 +420,13 @@ _ostree_bootloader_grub2_write_config (OstreeBootloader *bootloader,
|
||||
}
|
||||
|
||||
/* Now let's fdatasync() for the new file */
|
||||
{ glnx_fd_close int new_config_fd = open (gs_file_get_path_cached (new_config_path), O_RDONLY | O_CLOEXEC);
|
||||
if (new_config_fd < 0)
|
||||
{
|
||||
glnx_set_prefix_error_from_errno (error, "Opening %s", gs_file_get_path_cached (new_config_path));
|
||||
goto out;
|
||||
}
|
||||
{ glnx_fd_close int new_config_fd = -1;
|
||||
if (!glnx_openat_rdonly (AT_FDCWD, gs_file_get_path_cached (new_config_path), TRUE, &new_config_fd, error))
|
||||
goto out;
|
||||
|
||||
if (fdatasync (new_config_fd) < 0)
|
||||
{
|
||||
glnx_set_error_from_errno (error);
|
||||
(void)glnx_throw_errno_prefix (error, "fdatasync");
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user