From: Colin Walters Date: Wed, 12 Jul 2023 23:29:20 +0000 (-0400) Subject: sysroot: Add some error prefixing for bootversion X-Git-Tag: archive/raspbian/2023.7-3+rpi1~1^2~9^2^2~53^2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=6769d66dcc00a3223dab4d3ab61bd67a6ca13351;p=ostree.git 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. --- 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;