From fbd947dc0138b3883e1de709a5e0d59269bdf486 Mon Sep 17 00:00:00 2001 From: ririyeye <200610237@qq.com> Date: Thu, 23 Apr 2026 15:37:04 +0800 Subject: fix linux driver final review issue Drop the redundant newline normalization in kernel config checks because io.readfile() already returns newline-split content suitable for line-based matching. Made-with: Cursor --- xmake/rules/platform/linux/module/driver_modules.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'xmake/rules/platform/linux/module/driver_modules.lua') diff --git a/xmake/rules/platform/linux/module/driver_modules.lua b/xmake/rules/platform/linux/module/driver_modules.lua index df8bd095c..0e23a0100 100644 --- a/xmake/rules/platform/linux/module/driver_modules.lua +++ b/xmake/rules/platform/linux/module/driver_modules.lua @@ -89,8 +89,7 @@ end function _has_linux_headers_config(linux_headers, config) local configdata = _get_linux_headers_config(linux_headers) if configdata then - local normalized = configdata:gsub("\r\n", "\n"):gsub("\r", "\n") - for _, line in ipairs(normalized:split("\n")) do + for _, line in ipairs(configdata:split("\n")) do if line == config .. "=y" or line == "#define " .. config .. " 1" then return true end -- cgit v1.3.1