From: Petr Tesarik Date: Tue, 3 Dec 2024 13:54:40 +0100 Subject: libdrgn: kdump: prepare for incompatible changes in libkdumpfile-0.5.5 Upstream: merged Git-commit: 4e06cfdff158935eee725e726a63a5d9c9e57dab The kdump_get_typed_attr() function prototype changed in libkdumpfile commit e182aeaf4d72 ("Make kdump_get_typed_attr() easier to use"). Signed-off-by: Petr Tesarik --- libdrgn/kdump.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libdrgn/kdump.c b/libdrgn/kdump.c index 0bb594d1..4e5eea92 100644 --- a/libdrgn/kdump.c +++ b/libdrgn/kdump.c @@ -318,9 +318,14 @@ struct drgn_error *drgn_program_cache_kdump_threads(struct drgn_program *prog) + 1]; snprintf(attr_name, sizeof(attr_name), FORMAT, i); #undef FORMAT +#if KDUMPFILE_VERSION >= KDUMPFILE_MKVER(0, 5, 5) + ks = kdump_get_typed_attr(prog->kdump_ctx, attr_name, + KDUMP_BLOB, &prstatus_attr.val); +#else prstatus_attr.type = KDUMP_BLOB; ks = kdump_get_typed_attr(prog->kdump_ctx, attr_name, &prstatus_attr); +#endif if (ks != KDUMP_OK) { return drgn_error_format(DRGN_ERROR_OTHER, "kdump_get_typed_attr(%s): %s", -- 2.47.1