]> git.ipfire.org Git - thirdparty/kmod.git/commit
testsuite/path: defer and inline get_rootpath()
authorEmil Velikov <emil.l.velikov@gmail.com>
Sat, 24 May 2025 12:23:09 +0000 (13:23 +0100)
committerLucas De Marchi <lucas.de.marchi@gmail.com>
Thu, 29 May 2025 22:30:13 +0000 (17:30 -0500)
commitfdde586a187a0dcee2e0bfae8f2f907e5018321d
treefa692fcef260f9483fb5933b976a92b7861e5ea3
parent90d010b7ea55e2a0ac0314328de0c51cf1b21ec2
testsuite/path: defer and inline get_rootpath()

In a handful of use-cases, we don't need to trap the respective libc
function. Although at that point we have already fetched the rootfs
environment variable.

Defer it until it's needed and in the process inline the function. As
result we have a) less duplication in the wrappers and b) the rootpath
handling is no longer split across multiple functions.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Link: https://github.com/kmod-project/kmod/pull/355
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
testsuite/path.c