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
@@ -762,11 +762,7 @@ dispatch_set_read_source (OstreeRepo *repo,
|
||||
GLNX_AUTO_PREFIX_ERROR("opcode set-read-source", error);
|
||||
guint64 source_offset;
|
||||
|
||||
if (state->read_source_fd != -1)
|
||||
{
|
||||
(void) close (state->read_source_fd);
|
||||
state->read_source_fd = -1;
|
||||
}
|
||||
glnx_close_fd (&state->read_source_fd);
|
||||
|
||||
if (!read_varuint64 (state, &source_offset, error))
|
||||
return FALSE;
|
||||
@@ -799,12 +795,7 @@ dispatch_unset_read_source (OstreeRepo *repo,
|
||||
if (state->stats_only)
|
||||
return TRUE; /* Early return */
|
||||
|
||||
if (state->read_source_fd != -1)
|
||||
{
|
||||
(void) close (state->read_source_fd);
|
||||
state->read_source_fd = -1;
|
||||
}
|
||||
|
||||
glnx_close_fd (&state->read_source_fd);
|
||||
g_clear_pointer (&state->read_source_object, g_free);
|
||||
|
||||
return TRUE;
|
||||
|
||||
Reference in new issue
Block a user