78e962 kdump-lib: Introduce parse_kver_from_path() to get kernel version from its path name

Authored and Committed by Pingfan Liu a year ago
1 file changed. 43 lines added. 0 lines removed.
    kdump-lib: Introduce parse_kver_from_path() to get kernel version from its path name
    
    Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2160676
    Upstream: Fedora rawhide
    Conflict: None
    
    commit d8b961be37de09289a2ffff8c9c51cca4d153a92
    Author: Pingfan Liu <piliu@redhat.com>
    Date:   Tue Jun 13 17:43:21 2023 +0800
    
        kdump-lib: Introduce parse_kver_from_path() to get kernel version from its path name
    
        kdump_get_arch_recommend_crashkernel() expects the kernel version info,
        while _update_kernel() provides the absolute path, which contains the
        kernel version info.
    
        This patch introduce a dedicated function parse_kver_from_path() to
        extract the kernel info from the path
    
        Credit to Philipp, who contributes the original code.
    
        Signed-off-by: Pingfan Liu <piliu@redhat.com>
        Reviewed-by: Coiby Xu <coxu@redhat.com>
        Reviewed-by: Philipp Rudo <prudo@redhat.com>
    
    Signed-off-by: Pingfan Liu <piliu@redhat.com>
    
        
file modified
+43 -0