mirror of
https://github.com/ostreedev/ostree.git
synced 2024-12-22 17:35:55 +03:00
sysroot: Fix _ostree_sysroot_ensure_writable
This commit is contained in:
parent
e808a69067
commit
b3851dec99
@ -586,8 +586,11 @@ _ostree_sysroot_ensure_writable (OstreeSysroot *self, GError **error)
|
||||
|
||||
if (!ensure_sysroot_fd (self, error))
|
||||
return FALSE;
|
||||
if (!_ostree_sysroot_ensure_boot_fd (self, error))
|
||||
return FALSE;
|
||||
glnx_autofd int old_sysroot_fd = g_steal_fd (&self->sysroot_fd);
|
||||
if ((self->sysroot_fd = (int)syscall (SYS_open_tree, old_sysroot_fd, "sysroot", 1 /* OPEN_TREE_CLONE */ | O_CLOEXEC)) < 0)
|
||||
return glnx_throw_errno_prefix (error, "open_tree");
|
||||
if ((self->boot_fd = (int)syscall (SYS_open_tree, old_sysroot_fd, "boot", 1 /* OPEN_TREE_CLONE */ | O_CLOEXEC)) < 0)
|
||||
return glnx_throw_errno_prefix (error, "open_tree");
|
||||
|
||||
/* Switch back */
|
||||
if (in_root)
|
||||
|
Loading…
Reference in New Issue
Block a user