From 6769d66dcc00a3223dab4d3ab61bd67a6ca13351 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Wed, 12 Jul 2023 19:29:20 -0400 Subject: [PATCH] sysroot: Add some error prefixing for bootversion This came up in https://issues.redhat.com/browse/OCPBUGS-15955 and I'm 90% sure it's this readlink failing, but let's make it extra clear. --- src/libostree/ostree-sysroot.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/libostree/ostree-sysroot.c b/src/libostree/ostree-sysroot.c index 946bd353..d786cc5a 100644 --- a/src/libostree/ostree-sysroot.c +++ b/src/libostree/ostree-sysroot.c @@ -537,6 +537,8 @@ _ostree_sysroot_read_current_subbootversion (OstreeSysroot *self, int bootversio int *out_subbootversion, GCancellable *cancellable, GError **error) { + GLNX_AUTO_PREFIX_ERROR ("Reading current subbootversion", error); + if (!ensure_sysroot_fd (self, error)) return FALSE; @@ -556,7 +558,7 @@ _ostree_sysroot_read_current_subbootversion (OstreeSysroot *self, int bootversio g_autofree char *current_subbootdir_name = glnx_readlinkat_malloc (self->sysroot_fd, ostree_bootdir_name, cancellable, error); if (!current_subbootdir_name) - return FALSE; + return glnx_prefix_error (error, "Reading %s", ostree_bootdir_name); if (g_str_has_suffix (current_subbootdir_name, ".0")) *out_subbootversion = 0; -- 2.30.2