From: Riku Voipio <[email protected]>

System call number 0 might be in use in selected syscalls.

v2: Adapt to latest upstream

Signed-off-by: Riku Voipio <[email protected]>
---
 testcases/kernel/include/regen.sh |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/testcases/kernel/include/regen.sh 
b/testcases/kernel/include/regen.sh
index 3319703..3e9f0e7 100755
--- a/testcases/kernel/include/regen.sh
+++ b/testcases/kernel/include/regen.sh
@@ -36,7 +36,7 @@ cat << EOF > "${output_pid}"
 
 #define ltp_syscall(NR, ...) ({ \\
        int __ret; \\
-       if (NR == 0) { \\
+       if (NR == __LTP__NR_INVALID_SYSCALL) { \\
                errno = ENOSYS; \\
                __ret = -1; \\
        } else { \\
@@ -90,11 +90,12 @@ echo "Generating stub list ... "
 (
 echo
 echo "/* Common stubs */"
+echo "#define __LTP__NR_INVALID_SYSCALL -1" >> "${output_pid}"
 for nr in $(awk '{print $1}' "${srcdir}/"*.in | sort -u) ; do
        nr="__NR_${nr}"
        cat <<-EOF
        # ifndef ${nr}
-       #  define ${nr} 0
+       #  define ${nr} __LTP__NR_INVALID_SYSCALL
        # endif
        EOF
 done
-- 
1.7.10.4


------------------------------------------------------------------------------
Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET
Get 100% visibility into your production application - at no cost.
Code-level diagnostics for performance bottlenecks with <2% overhead
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap1
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to