Update libglnx, port various bits to new API

Using the error prefixing in the delta processing allows us to
do new code style.  Also strip trailing whitespace.

Use error prefixing in a few other random places.  I didn't
hunt for all of them, just testing out the new API.

Use `glnx_fchmod()`.  Also note I dropped one `fchmod (tmpf, 0600)`
which is no longer necessary.

Update submodule: libglnx

Closes: #1011
Approved by: jlebon
This commit is contained in:
Colin Walters authored and Atomic Bot committed 2017-07-18 19:18:38 +00:00
1 parent efd460782a
commit 2a9689b76a
10 files changed
+111 -176

No files matched your search

+2 -2
View File
@@ -203,8 +203,8 @@ _ostree_impl_system_generator (const char *ostree_cmdline,
return FALSE;
g_clear_object (&outstream);
/* It should be readable */
if (fchmod (tmpf.fd, 0644) < 0)
return glnx_throw_errno_prefix (error, "fchmod");
if (!glnx_fchmod (tmpf.fd, 0644, error))
return FALSE;
/* Error out if somehow it already exists, that'll help us debug conflicts */
if (!glnx_link_tmpfile_at (&tmpf, GLNX_LINK_TMPFILE_NOREPLACE,
normal_dir_dfd, "var.mount", error))