linux-user: add kcmp() syscall
diff mbox

Message ID 1474834820-24198-1-git-send-email-laurent@vivier.eu
State New
Headers show

Commit Message

Laurent Vivier Sept. 25, 2016, 8:20 p.m. UTC
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 linux-user/syscall.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

Comments

no-reply@patchew.org Sept. 25, 2016, 8:29 p.m. UTC | #1
Hi,

Your series seems to have some coding style problems. See output below for
more information:

Message-id: 1474834820-24198-1-git-send-email-laurent@vivier.eu
Type: series
Subject: [Qemu-devel] [PATCH] linux-user: add kcmp() syscall

=== TEST SCRIPT BEGIN ===
#!/bin/bash

BASE=base
n=1
total=$(git log --oneline $BASE.. | wc -l)
failed=0

# Useful git options
git config --local diff.renamelimit 0
git config --local diff.renames True

commits="$(git log --format=%H --reverse $BASE..)"
for c in $commits; do
    echo "Checking PATCH $n/$total: $(git show --no-patch --format=%s $c)..."
    if ! git show $c --format=email | ./scripts/checkpatch.pl --mailback -; then
        failed=1
        echo
    fi
    n=$((n+1))
done

exit $failed
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
From https://github.com/patchew-project/qemu
 * [new tag]         patchew/1474834820-24198-1-git-send-email-laurent@vivier.eu -> patchew/1474834820-24198-1-git-send-email-laurent@vivier.eu
Switched to a new branch 'test'
75f537b linux-user: add kcmp() syscall

=== OUTPUT BEGIN ===
Checking PATCH 1/1: linux-user: add kcmp() syscall...
ERROR: architecture specific defines should be avoided
#17: FILE: linux-user/syscall.c:307:
+#if defined(TARGET_NR_kcmp) && defined(__NR_kcmp)

ERROR: architecture specific defines should be avoided
#29: FILE: linux-user/syscall.c:11950:
+#if defined(TARGET_NR_kcmp) && defined(__NR_kcmp)

total: 2 errors, 0 warnings, 22 lines checked

Your patch has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

=== OUTPUT END ===

Test command exited with code: 1


---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to patchew-devel@freelists.org

Patch
diff mbox

diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index d21d901..a32386e 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -304,6 +304,11 @@  _syscall3(int, ioprio_set, int, which, int, who, int, ioprio)
 _syscall3(int, getrandom, void *, buf, size_t, buflen, unsigned int, flags)
 #endif
 
+#if defined(TARGET_NR_kcmp) && defined(__NR_kcmp)
+_syscall5(int, kcmp, pid_t, pid1, pid_t, pid2, int, type,
+          unsigned long, idx1, unsigned long, idx2)
+#endif
+
 static bitmask_transtbl fcntl_flags_tbl[] = {
   { TARGET_O_ACCMODE,   TARGET_O_WRONLY,    O_ACCMODE,   O_WRONLY,    },
   { TARGET_O_ACCMODE,   TARGET_O_RDWR,      O_ACCMODE,   O_RDWR,      },
@@ -11943,6 +11948,11 @@  abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
         ret = get_errno(unshare(arg1));
         break;
 #endif
+#if defined(TARGET_NR_kcmp) && defined(__NR_kcmp)
+    case TARGET_NR_kcmp:
+        ret = get_errno(kcmp(arg1, arg2, arg3, arg4, arg5));
+        break;
+#endif
 
     default:
     unimplemented: