sysroot: Also maintain canonical boot_fd

Just like we hold a fd for `/sysroot`, also do so for `/boot`
instead of opening and closing it in a few places.

This is a preparatory cleanup for further work.
This commit is contained in:
Colin Walters committed 2021-01-10 13:46:11 +00:00
1 parent 10556a95b4
commit a1c0cffeb3
3 files changed
+34 -17

No files matched your search

+4
View File
@@ -56,6 +56,7 @@ struct OstreeSysroot {
GFile *path;
int sysroot_fd;
int boot_fd;
GLnxLockFile lock;
OstreeSysrootLoadState loadstate;
@@ -160,6 +161,9 @@ char * _ostree_sysroot_get_runstate_path (OstreeDeployment *deployment, const ch
char *_ostree_sysroot_join_lines (GPtrArray *lines);
gboolean
_ostree_sysroot_ensure_boot_fd (OstreeSysroot *self, GError **error);
gboolean _ostree_sysroot_query_bootloader (OstreeSysroot *sysroot,
OstreeBootloader **out_bootloader,
GCancellable *cancellable,