未验证 提交 fb605738 编写于 作者: C Cleber Rosa

Merge remote-tracking branch 'PraveenPenguin/new_module'

Signed-off-by: NCleber Rosa <crosa@redhat.com>
......@@ -105,7 +105,8 @@ def loaded_module_info(module_name):
"""
l_raw = process.system_output('/sbin/lsmod').decode('utf-8')
modinfo_dic = parse_lsmod_for_module(l_raw, module_name)
output = process.system_output("/sbin/modinfo %s" % module_name).decode('utf-8')
output = process.system_output(
"/sbin/modinfo %s" % module_name).decode('utf-8')
if output:
param_list = []
for line in output.splitlines():
......@@ -237,3 +238,15 @@ def check_kernel_config(config_name):
else:
return BUILTIN
return NOT_SET
def get_modules_dir():
"""
Return the modules dir for the running kernel version
:return: path of module directory
:rtype: String
"""
kernel_version = platform.uname()[2]
return '/lib/modules/%s/kernel' % kernel_version
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册