tree-wide: Update to new libglnx fd APIs
This ends up a lot better IMO. This commit is *mostly* just
`s/glnx_close_fd/glnx_autofd`, but there's also a number of hunks like:
```
- if (self->sysroot_fd != -1)
- {
- (void) close (self->sysroot_fd);
- self->sysroot_fd = -1;
- }
+ glnx_close_fd (&self->sysroot_fd);
```
Update submodule: libglnx
Closes: #1259
Approved by: jlebon
This commit is contained in:
1 parent
3e3d28632d
commit
1825f03fe7
29 files changed
+116
-137
No files matched your search
@@ -782,7 +782,7 @@ checkout_tree_at_recurse (OstreeRepo *self,
|
||||
}
|
||||
}
|
||||
|
||||
glnx_fd_close int destination_dfd = -1;
|
||||
glnx_autofd int destination_dfd = -1;
|
||||
if (!glnx_opendirat (destination_parent_fd, destination_name, TRUE,
|
||||
&destination_dfd, error))
|
||||
return FALSE;
|
||||
@@ -947,7 +947,7 @@ checkout_tree_at (OstreeRepo *self,
|
||||
* exists.
|
||||
*/
|
||||
int destination_dfd = destination_parent_fd;
|
||||
glnx_fd_close int destination_dfd_owned = -1;
|
||||
glnx_autofd int destination_dfd_owned = -1;
|
||||
if (strcmp (destination_name, ".") != 0)
|
||||
{
|
||||
if (mkdirat (destination_parent_fd, destination_name, 0700) < 0
|
||||
|
||||
Reference in new issue
Block a user