ostree/0004-lib-deploy-Rename-variable-for-clarity.patch

38 lines
1.6 KiB
Diff

From 76649127d1f415abdfd2e8de62ce8a2beef5f412 Mon Sep 17 00:00:00 2001
From: Jonathan Lebon <jonathan@jlebon.com>
Date: Sun, 28 May 2023 18:37:48 -0400
Subject: [PATCH 4/5] lib/deploy: Rename variable for clarity
`size_to_remove` looks cryptic in contrast to
`new_new_bootcsum_dirs_total_size`. Rename it in the style of the latter
for easier reading.
---
src/libostree/ostree-sysroot-deploy.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/libostree/ostree-sysroot-deploy.c b/src/libostree/ostree-sysroot-deploy.c
index 7de6fdf3..450f593e 100644
--- a/src/libostree/ostree-sysroot-deploy.c
+++ b/src/libostree/ostree-sysroot-deploy.c
@@ -2567,14 +2567,14 @@ auto_early_prune_old_deployments (OstreeSysroot *self, GPtrArray *new_deployment
/* OK, we would fail if we tried to write the new bootdirs. Is it salvageable?
* First, calculate how much space we could save with the bootcsums scheduled
* for removal. */
- guint64 size_to_remove = 0;
+ guint64 bootcsum_dirs_to_remove_total_size = 0;
GLNX_HASH_TABLE_FOREACH_KV (current_bootcsums, const char *, bootcsum, gpointer, sizep)
{
if (!g_hash_table_contains (new_bootcsums, bootcsum))
- size_to_remove += GPOINTER_TO_UINT (sizep);
+ bootcsum_dirs_to_remove_total_size += GPOINTER_TO_UINT (sizep);
}
- if (net_new_bootcsum_dirs_total_size > (available_size + size_to_remove))
+ if (net_new_bootcsum_dirs_total_size > (available_size + bootcsum_dirs_to_remove_total_size))
{
/* Even if we auto-pruned, the new bootdirs wouldn't fit. Just let the
* code continue and let it hit ENOSPC. */
--
2.40.1