[RFC PATCH 3/4] Get kernel version from OSRELEASE in vmcoreinfo
kazuhito.hagio at gmail.com
kazuhito.hagio at gmail.com
Thu Jan 14 03:25:08 EST 2021
From: Kazuhito Hagio <k-hagio-ab at nec.com>
Signed-off-by: Kazuhito Hagio <k-hagio-ab at nec.com>
---
makedumpfile.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/makedumpfile.c b/makedumpfile.c
index 199748b..fdfe437 100644
--- a/makedumpfile.c
+++ b/makedumpfile.c
@@ -1182,6 +1182,7 @@ check_release(void)
}
}
+ info->kernel_version = FALSE;
info->kernel_version = get_kernel_version(info->system_utsname.release);
if (info->kernel_version == FALSE) {
ERRMSG("Can't get the kernel version.\n");
@@ -2480,6 +2481,9 @@ read_vmcoreinfo_basic_info(void)
if (strlen(info->release))
continue;
strcpy(info->release, buf + strlen(STR_OSRELEASE));
+
+ if (!info->kernel_version)
+ info->kernel_version = get_kernel_version(info->release);
}
if (strncmp(buf, STR_PAGESIZE, strlen(STR_PAGESIZE)) == 0) {
page_size = strtol(buf+strlen(STR_PAGESIZE),&endp,10);
--
2.9.3
More information about the kexec
mailing list