Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Nov 2021 20:22:02 GMT
From:      Brooks Davis <brooks@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 1739de97af19 - main - makesyscalls: make strip_abi_prefix more robust
Message-ID:  <202111172022.1AHKM2E6059185@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by brooks:

URL: https://cgit.FreeBSD.org/src/commit/?id=1739de97af19d2eb726becd38758fc7a06dcc6e9

commit 1739de97af19d2eb726becd38758fc7a06dcc6e9
Author:     Brooks Davis <brooks@FreeBSD.org>
AuthorDate: 2021-11-17 20:12:21 +0000
Commit:     Brooks Davis <brooks@FreeBSD.org>
CommitDate: 2021-11-17 20:12:21 +0000

    makesyscalls: make strip_abi_prefix more robust
    
    Allow strip_abi_prefix() to be called with nil and return nil in that
    case.  This simplifies handling of RESERVED entries.
    
    Reviewed by:    kevans
---
 sys/tools/makesyscalls.lua | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/sys/tools/makesyscalls.lua b/sys/tools/makesyscalls.lua
index 7824a533e4d5..a390be8b6154 100644
--- a/sys/tools/makesyscalls.lua
+++ b/sys/tools/makesyscalls.lua
@@ -352,6 +352,9 @@ end
 local function strip_abi_prefix(funcname)
 	local abiprefix = config["abi_func_prefix"]
 	local stripped_name
+	if funcname == nil then
+		return nil
+	end
 	if abiprefix ~= "" and funcname:find("^" .. abiprefix) then
 		stripped_name = funcname:gsub("^" .. abiprefix, "")
 	else



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202111172022.1AHKM2E6059185>