diff mbox series

[pseudo,2/2] makewrappers: Avoid efault workaround if using AT_EMPTY_PATH

Message ID 20260729144226.2680004-2-richard.purdie@linuxfoundation.org
State New
Headers show
Series [pseudo,1/2] ports/linux/guts: Add __open64_2 wrapper | expand

Commit Message

Richard Purdie July 29, 2026, 2:42 p.m. UTC
The efault workaround shouldn't apply if AT_EMPTY_PATH is specified
as in that case, an empty path is allowed.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 makewrappers | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/makewrappers b/makewrappers
index 83f5ca6..19508fa 100755
--- a/makewrappers
+++ b/makewrappers
@@ -415,7 +415,7 @@  class Function:
             if self.efault and path in self.efault.split('|'):
                 fix_paths.append(
                     # Emulate EFAULT when path is null
-                    "if (%s == NULL) {\n"
+                    "if ((%s == NULL) && !(flags & AT_EMPTY_PATH)) {\n"
                     "\t\t\terrno = EFAULT;\n"
                     "\t\t\t%s -1;\n"
                     "\t\t\tgoto quick_exit;\n"