Commit 8ea2d73f authored by Jialin Zhang's avatar Jialin Zhang Committed by Zheng Zengkai
Browse files

kabi: fix split error of kABI reference checking tool

hulk inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I4JZ0H


CVE: NA

-------------------------------

Use the kABI reference checking tool as follows:

  ./scripts/check-kabi -k Module.symvers.baseline -s Module.symvers

A python error occurred, and the following traceback is printed:

Traceback (most recent call last):
  File "./scripts/check-kabi", line 144, in <module>
    load_symvers(symvers,symvers_file)
  File "./scripts/check-kabi", line 45, in load_symvers
    checksum,symbol,directory,type = string.split(in_line)
ValueError: too many values to unpack

It is because the Module.symvers file change its line format in
the following commits, and the namespace field may be empty:
cb9b55d2 ("modpost: add support for symbol namespaces")
5190044c ("modpost: move the namespace field in Module.symvers last")

In order to solve this problem, use '\t' to split each line and
add a variable to save namespace.

Fixes: 9fc7fbaf ("kabi: add kABI reference checking tool")
Signed-off-by: default avatarJialin Zhang <zhangjialin11@huawei.com>
Reviewed-by: default avatarWei Li <liwei391@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent e69ae850
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment