lib/sysroot-cleanup: Make bootfs cleanup function global
authorJonathan Lebon <jonathan@jlebon.com>
Thu, 13 Apr 2023 21:22:41 +0000 (17:22 -0400)
committerJonathan Lebon <jonathan@jlebon.com>
Fri, 14 Apr 2023 13:57:16 +0000 (09:57 -0400)
Prep for future patch.

src/libostree/ostree-sysroot-cleanup.c
src/libostree/ostree-sysroot-private.h

index 2fc2ffb4b2e2094f9f917fd1c0d16fad8b3e949b..533a4fdd346c3ae1ada15cefaa7e5b029c256466 100644 (file)
@@ -292,10 +292,10 @@ cleanup_old_deployments (OstreeSysroot       *self,
 /* This function deletes any files in the bootfs unreferenced by the active
  * bootloader configuration.
  */
-static gboolean
-cleanup_bootfs (OstreeSysroot       *self,
-                GCancellable        *cancellable,
-                GError             **error)
+gboolean
+_ostree_sysroot_cleanup_bootfs (OstreeSysroot       *self,
+                                GCancellable        *cancellable,
+                                GError             **error)
 {
   /* Load all active bootcsums and overlays referenced by bootloader configuration. */
   g_autoptr(GHashTable) active_boot_checksums =
@@ -572,7 +572,7 @@ _ostree_sysroot_cleanup_internal (OstreeSysroot              *self,
   if (!cleanup_old_deployments (self, cancellable, error))
     return glnx_prefix_error (error, "Cleaning deployments");
 
-  if (!cleanup_bootfs (self, cancellable, error))
+  if (!_ostree_sysroot_cleanup_bootfs (self, cancellable, error))
     return glnx_prefix_error (error, "Cleaning bootfs");
 
   OstreeRepo *repo = ostree_sysroot_repo (self);
index dfa649cb57fb94ad0c6114703714941ce8facde6..57ac6824ca2258991577cec4deb7e61e26eb50cd 100644 (file)
@@ -187,6 +187,11 @@ gboolean _ostree_sysroot_cleanup_internal (OstreeSysroot *sysroot,
                                            GCancellable  *cancellable,
                                            GError       **error);
 
+gboolean
+_ostree_sysroot_cleanup_bootfs (OstreeSysroot       *self,
+                                GCancellable        *cancellable,
+                                GError             **error);
+
 gboolean _ostree_sysroot_parse_bootdir_name (const char *name,
                                              char      **out_osname,
                                              char      **out_csum);