get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/954018/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 954018,
    "url": "http://patchwork.ozlabs.org/api/patches/954018/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/1533574847-19294-14-git-send-email-aleksandar.markovic@rt-rk.com/",
    "project": {
        "id": 14,
        "url": "http://patchwork.ozlabs.org/api/projects/14/?format=api",
        "name": "QEMU Development",
        "link_name": "qemu-devel",
        "list_id": "qemu-devel.nongnu.org",
        "list_email": "qemu-devel@nongnu.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": "",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<1533574847-19294-14-git-send-email-aleksandar.markovic@rt-rk.com>",
    "list_archive_url": null,
    "date": "2018-08-06T16:59:40",
    "name": "[v7,13/80] linux-user: Add preprocessor availability control to some syscalls",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "cd50bcd503826612657cdbcf7a741b1c97178c94",
    "submitter": {
        "id": 68635,
        "url": "http://patchwork.ozlabs.org/api/people/68635/?format=api",
        "name": "Aleksandar Markovic",
        "email": "aleksandar.markovic@rt-rk.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/1533574847-19294-14-git-send-email-aleksandar.markovic@rt-rk.com/mbox/",
    "series": [
        {
            "id": 59520,
            "url": "http://patchwork.ozlabs.org/api/series/59520/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=59520",
            "date": "2018-08-06T16:59:27",
            "name": "Add nanoMIPS support to QEMU",
            "version": 7,
            "mbox": "http://patchwork.ozlabs.org/series/59520/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/954018/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/954018/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>",
        "X-Original-To": "incoming@patchwork.ozlabs.org",
        "Delivered-To": "patchwork-incoming@bilbo.ozlabs.org",
        "Authentication-Results": [
            "ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)",
            "ozlabs.org;\n\tdmarc=none (p=none dis=none) header.from=rt-rk.com"
        ],
        "Received": [
            "from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 41kksN55c8z9ryt\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue,  7 Aug 2018 03:19:20 +1000 (AEST)",
            "from localhost ([::1]:35251 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1fmjA6-0000RF-9O\n\tfor incoming@patchwork.ozlabs.org; Mon, 06 Aug 2018 13:19:18 -0400",
            "from eggs.gnu.org ([2001:4830:134:3::10]:54034)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <aleksandar.markovic@rt-rk.com>) id 1fmixb-0005x4-Jg\n\tfor qemu-devel@nongnu.org; Mon, 06 Aug 2018 13:06:24 -0400",
            "from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <aleksandar.markovic@rt-rk.com>) id 1fmixY-00071I-Sh\n\tfor qemu-devel@nongnu.org; Mon, 06 Aug 2018 13:06:23 -0400",
            "from mx2.rt-rk.com ([89.216.37.149]:43856 helo=mail.rt-rk.com)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <aleksandar.markovic@rt-rk.com>)\n\tid 1fmixY-000710-Fl\n\tfor qemu-devel@nongnu.org; Mon, 06 Aug 2018 13:06:20 -0400",
            "from localhost (localhost [127.0.0.1])\n\tby mail.rt-rk.com (Postfix) with ESMTP id 2931D1A20C6;\n\tMon,  6 Aug 2018 19:06:14 +0200 (CEST)",
            "from rtrkw774-lin.domain.local (rtrkw774-lin.domain.local\n\t[10.10.13.43])\n\tby mail.rt-rk.com (Postfix) with ESMTPSA id EC1BE1A209F;\n\tMon,  6 Aug 2018 19:06:13 +0200 (CEST)"
        ],
        "X-Virus-Scanned": "amavisd-new at rt-rk.com",
        "From": "Aleksandar Markovic <aleksandar.markovic@rt-rk.com>",
        "To": "qemu-devel@nongnu.org",
        "Date": "Mon,  6 Aug 2018 18:59:40 +0200",
        "Message-Id": "<1533574847-19294-14-git-send-email-aleksandar.markovic@rt-rk.com>",
        "X-Mailer": "git-send-email 2.7.4",
        "In-Reply-To": "<1533574847-19294-1-git-send-email-aleksandar.markovic@rt-rk.com>",
        "References": "<1533574847-19294-1-git-send-email-aleksandar.markovic@rt-rk.com>",
        "X-detected-operating-system": "by eggs.gnu.org: GNU/Linux 3.x [fuzzy]",
        "X-Received-From": "89.216.37.149",
        "Subject": "[Qemu-devel] [PATCH v7 13/80] linux-user: Add preprocessor\n\tavailability control to some syscalls",
        "X-BeenThere": "qemu-devel@nongnu.org",
        "X-Mailman-Version": "2.1.21",
        "Precedence": "list",
        "List-Id": "<qemu-devel.nongnu.org>",
        "List-Unsubscribe": "<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>",
        "List-Archive": "<http://lists.nongnu.org/archive/html/qemu-devel/>",
        "List-Post": "<mailto:qemu-devel@nongnu.org>",
        "List-Help": "<mailto:qemu-devel-request@nongnu.org?subject=help>",
        "List-Subscribe": "<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>",
        "Cc": "peter.maydell@linaro.org, thuth@redhat.com, pburton@wavecomp.com,\n\tsmarkovic@wavecomp.com, riku.voipio@iki.fi,\n\trichard.henderson@linaro.org, laurent@vivier.eu,\n\tarmbru@redhat.com, arikalo@wavecomp.com,\n\tphilippe.mathieu.daude@gmail.com, amarkovic@wavecomp.com,\n\tpjovanovic@wavecomp.com, aurelien@aurel32.net",
        "Errors-To": "qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org",
        "Sender": "\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"
    },
    "content": "From: Aleksandar Rikalo <arikalo@wavecomp.com>\n\nAdd ability to target platforms to individually include user-mode\nsupport for system calls from \"stat\" group of system calls.\n\nThis change is related to new nanoMIPS platform in the sense that\nit supports a different set of \"stat\" system calls than any other\ntarget. nanoMIPS does not support structures stat and stat64 at\nall. Also, support for certain number of other system calls is\ndropped in nanoMIPS (those are most of the time obsoleted system\ncalls).\n\nWithout this patch, build for nanoMIPS would fail.\n\nReviewed-by: Richard Henderson <richard.henderson@linaro.org>\nReviewed-by: Aleksandar Markovic <amarkovic@wavecomp.com>\nSigned-off-by: Aleksandar Markovic <amarkovic@wavecomp.com>\nSigned-off-by: Stefan Markovic <smarkovic@wavecomp.com>\n---\n linux-user/strace.c  | 14 +++++++++++++-\n linux-user/syscall.c | 29 +++++++++++++++++++++++++++++\n 2 files changed, 42 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/linux-user/strace.c b/linux-user/strace.c\nindex bd897a3..33f4a50 100644\n--- a/linux-user/strace.c\n+++ b/linux-user/strace.c\n@@ -2304,7 +2304,19 @@ print_statfs(const struct syscallname *name,\n     print_pointer(arg1, 1);\n     print_syscall_epilogue(name);\n }\n-#define print_statfs64  print_statfs\n+#endif\n+\n+#ifdef TARGET_NR_statfs64\n+static void\n+print_statfs64(const struct syscallname *name,\n+    abi_long arg0, abi_long arg1, abi_long arg2,\n+    abi_long arg3, abi_long arg4, abi_long arg5)\n+{\n+    print_syscall_prologue(name);\n+    print_string(arg0, 0);\n+    print_pointer(arg1, 1);\n+    print_syscall_epilogue(name);\n+}\n #endif\n \n #ifdef TARGET_NR_symlink\ndiff --git a/linux-user/syscall.c b/linux-user/syscall.c\nindex dfc851c..3d57966 100644\n--- a/linux-user/syscall.c\n+++ b/linux-user/syscall.c\n@@ -7286,6 +7286,9 @@ static inline int target_to_host_mlockall_arg(int arg)\n }\n #endif\n \n+#if (defined(TARGET_NR_stat64) || defined(TARGET_NR_lstat64) ||     \\\n+     defined(TARGET_NR_fstat64) || defined(TARGET_NR_fstatat64) ||  \\\n+     defined(TARGET_NR_newfstatat))\n static inline abi_long host_to_target_stat64(void *cpu_env,\n                                              abi_ulong target_addr,\n                                              struct stat *host_st)\n@@ -7348,6 +7351,7 @@ static inline abi_long host_to_target_stat64(void *cpu_env,\n \n     return 0;\n }\n+#endif\n \n /* ??? Using host futex calls even when target atomic operations\n    are not really atomic probably breaks things.  However implementing\n@@ -7996,8 +8000,15 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,\n {\n     CPUState *cpu = ENV_GET_CPU(cpu_env);\n     abi_long ret;\n+#if defined(TARGET_NR_stat) || defined(TARGET_NR_stat64) \\\n+    || defined(TARGET_NR_lstat) || defined(TARGET_NR_lstat64) \\\n+    || defined(TARGET_NR_fstat) || defined(TARGET_NR_fstat64)\n     struct stat st;\n+#endif\n+#if defined(TARGET_NR_statfs) || defined(TARGET_NR_statfs64) \\\n+    || defined(TARGET_NR_fstatfs)\n     struct statfs stfs;\n+#endif\n     void *p;\n \n #if defined(DEBUG_ERESTARTSYS)\n@@ -8365,9 +8376,11 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,\n     case TARGET_NR_oldstat:\n         goto unimplemented;\n #endif\n+#ifdef TARGET_NR_lseek\n     case TARGET_NR_lseek:\n         ret = get_errno(lseek(arg1, arg2, arg3));\n         break;\n+#endif\n #if defined(TARGET_NR_getxpid) && defined(TARGET_ALPHA)\n     /* Alpha specific */\n     case TARGET_NR_getxpid:\n@@ -9251,6 +9264,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,\n         ret = get_errno(sethostname(p, arg2));\n         unlock_user(p, arg1, 0);\n         break;\n+#ifdef TARGET_NR_setrlimit\n     case TARGET_NR_setrlimit:\n         {\n             int resource = target_to_host_resource(arg1);\n@@ -9264,6 +9278,8 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,\n             ret = get_errno(setrlimit(resource, &rlim));\n         }\n         break;\n+#endif\n+#ifdef TARGET_NR_getrlimit\n     case TARGET_NR_getrlimit:\n         {\n             int resource = target_to_host_resource(arg1);\n@@ -9280,6 +9296,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,\n             }\n         }\n         break;\n+#endif\n     case TARGET_NR_getrusage:\n         {\n             struct rusage rusage;\n@@ -9644,15 +9661,19 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,\n         ret = get_errno(munlockall());\n         break;\n #endif\n+#ifdef TARGET_NR_truncate\n     case TARGET_NR_truncate:\n         if (!(p = lock_user_string(arg1)))\n             goto efault;\n         ret = get_errno(truncate(p, arg2));\n         unlock_user(p, arg1, 0);\n         break;\n+#endif\n+#ifdef TARGET_NR_ftruncate\n     case TARGET_NR_ftruncate:\n         ret = get_errno(ftruncate(arg1, arg2));\n         break;\n+#endif\n     case TARGET_NR_fchmod:\n         ret = get_errno(fchmod(arg1, arg2));\n         break;\n@@ -9688,6 +9709,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,\n     case TARGET_NR_profil:\n         goto unimplemented;\n #endif\n+#ifdef TARGET_NR_statfs\n     case TARGET_NR_statfs:\n         if (!(p = lock_user_string(arg1)))\n             goto efault;\n@@ -9719,9 +9741,12 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,\n             unlock_user_struct(target_stfs, arg2, 1);\n         }\n         break;\n+#endif\n+#ifdef TARGET_NR_fstatfs\n     case TARGET_NR_fstatfs:\n         ret = get_errno(fstatfs(arg1, &stfs));\n         goto convert_statfs;\n+#endif\n #ifdef TARGET_NR_statfs64\n     case TARGET_NR_statfs64:\n         if (!(p = lock_user_string(arg1)))\n@@ -9969,6 +9994,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,\n         unlock_user(p, arg1, 0);\n         goto do_stat;\n #endif\n+#ifdef TARGET_NR_fstat\n     case TARGET_NR_fstat:\n         {\n             ret = get_errno(fstat(arg1, &st));\n@@ -9998,6 +10024,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,\n             }\n         }\n         break;\n+#endif\n #ifdef TARGET_NR_olduname\n     case TARGET_NR_olduname:\n         goto unimplemented;\n@@ -10997,6 +11024,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,\n         break;\n \n #ifdef CONFIG_SENDFILE\n+#ifdef TARGET_NR_sendfile\n     case TARGET_NR_sendfile:\n     {\n         off_t *offp = NULL;\n@@ -11017,6 +11045,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,\n         }\n         break;\n     }\n+#endif\n #ifdef TARGET_NR_sendfile64\n     case TARGET_NR_sendfile64:\n     {\n",
    "prefixes": [
        "v7",
        "13/80"
    ]
}