get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 56662,
    "url": "https://patches.dpdk.org/api/patches/56662/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20190718004822.25431-3-stephen@networkplumber.org/",
    "project": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<20190718004822.25431-3-stephen@networkplumber.org>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20190718004822.25431-3-stephen@networkplumber.org",
    "date": "2019-07-18T00:48:21",
    "name": "[v2,2/3] cfgfile: use RTE_LOG for errors",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "14ae0efa73e90b8e708b287bf0f8600003bf913c",
    "submitter": {
        "id": 27,
        "url": "https://patches.dpdk.org/api/people/27/?format=api",
        "name": "Stephen Hemminger",
        "email": "stephen@networkplumber.org"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20190718004822.25431-3-stephen@networkplumber.org/mbox/",
    "series": [
        {
            "id": 5578,
            "url": "https://patches.dpdk.org/api/series/5578/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=5578",
            "date": "2019-07-18T00:48:19",
            "name": "cfgfile: cleanup patches",
            "version": 2,
            "mbox": "https://patches.dpdk.org/series/5578/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/56662/comments/",
    "check": "fail",
    "checks": "https://patches.dpdk.org/api/patches/56662/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@dpdk.org",
        "Delivered-To": "patchwork@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id F12C45B3C;\n\tThu, 18 Jul 2019 02:48:34 +0200 (CEST)",
            "from mail-pl1-f180.google.com (mail-pl1-f180.google.com\n\t[209.85.214.180]) by dpdk.org (Postfix) with ESMTP id 312F13977\n\tfor <dev@dpdk.org>; Thu, 18 Jul 2019 02:48:31 +0200 (CEST)",
            "by mail-pl1-f180.google.com with SMTP id k8so12910524plt.3\n\tfor <dev@dpdk.org>; Wed, 17 Jul 2019 17:48:31 -0700 (PDT)",
            "from xps13.lan (204-195-22-127.wavecable.com. [204.195.22.127])\n\tby smtp.gmail.com with ESMTPSA id\n\t131sm30459808pfx.57.2019.07.17.17.48.27\n\t(version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256);\n\tWed, 17 Jul 2019 17:48:27 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=networkplumber-org.20150623.gappssmtp.com; s=20150623;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=BWDc2KzXp1C4MJaBxyKhqZjuIf1Ds8kSxISbqBiAlUo=;\n\tb=ygsO4C2TIPzKfytCJVOkI01IMF1/vQUjhkO7jD6iiu/Jlbbsm9OSSGk98ge1n7/oc4\n\t0Ygl3WQzt9Fsb0skMpe1ccevZOdj2/i6X4/vKTSpSRS21c6L4ilF/TCgfUVmia6AjBAo\n\tOSYbp6SqutdNYxDGsJgu734fSY27GZxEntT84CAfIzOIO40uTRd53+BnvOV20c4pYdVK\n\tTRM89b33HwkgQQpWz9Rqm7/3jfJHCqvGubx4O2v1OJcxK48nJTcc04x13bJOyWmXPuyv\n\thJKJDIKt3MePSaZv9VBk/wdLGZafvELAPNcSVJYx4PGoqq0rnvrJsQNScMyi/ZBOc/Nc\n\tOZMQ==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=BWDc2KzXp1C4MJaBxyKhqZjuIf1Ds8kSxISbqBiAlUo=;\n\tb=SB4eXI0gq4/VyKnG5uCpPv2nUfdHodI9wne/mzqfs0YAYsQRPT3gV/F81rf2U/q/Pd\n\tzkNFzCfIwMJsDRL+RKCYyz1/fykTYWUhYTLDHiB9MVzXI7YFendh5XavRaSzb9EGMYgc\n\tQvWyG7MMy0URjKacS7DO9DfoYVggRgbSU1qlT2l0D6Tls/NLozCaGSg7XQcYRVONpBqd\n\tXjxYqg/CL7zqyyGSCMJA+9738AoXMQu8Q0j19RqIcIVUhu4ssGiNcgxJkgxzvXrsUkBF\n\thSpUqI79Hl9/temMQak1Y1nJz9HV+PaWtkhToczTShcRscfuEzS3NnQDpbx/anzPM58d\n\tSH0g==",
        "X-Gm-Message-State": "APjAAAX3hHYjl2WpvfR4IMibmOcdYAS741bL+lYiHi1P+bJhnsdZ35hx\n\tcI3NIQqUPp42pLu2rJKKu5jXEjDk",
        "X-Google-Smtp-Source": "APXvYqzdW2seK6XuMr6bJ5+khXd0JU03s4IjbVvIsRpXRfG8FC9l2LBtUwaNNcShId5xxVCEF0qBbA==",
        "X-Received": "by 2002:a17:902:684:: with SMTP id\n\t4mr47068302plh.138.1563410909926; \n\tWed, 17 Jul 2019 17:48:29 -0700 (PDT)",
        "From": "Stephen Hemminger <stephen@networkplumber.org>",
        "To": "dev@dpdk.org",
        "Cc": "Stephen Hemminger <stephen@networkplumber.org>",
        "Date": "Wed, 17 Jul 2019 17:48:21 -0700",
        "Message-Id": "<20190718004822.25431-3-stephen@networkplumber.org>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20190718004822.25431-1-stephen@networkplumber.org>",
        "References": "<20190716172741.21399-1-stephen@networkplumber.org>\n\t<20190718004822.25431-1-stephen@networkplumber.org>",
        "Subject": "[dpdk-dev] [PATCH v2 2/3] cfgfile: use RTE_LOG for errors",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "In general, DPDK libraries to not print error messages to\nstdout because that is often redirected to /dev/null for daemons.\nThis patch changes cfgfile library to use RTE_LOG with its\nown type.\n\nSigned-off-by: Stephen Hemminger <stephen@networkplumber.org>\n---\n lib/librte_cfgfile/Makefile      |  1 +\n lib/librte_cfgfile/rte_cfgfile.c | 38 +++++++++++++++++++++++---------\n 2 files changed, 29 insertions(+), 10 deletions(-)",
    "diff": "diff --git a/lib/librte_cfgfile/Makefile b/lib/librte_cfgfile/Makefile\nindex d9512565e559..4fc711778699 100644\n--- a/lib/librte_cfgfile/Makefile\n+++ b/lib/librte_cfgfile/Makefile\n@@ -11,6 +11,7 @@ LIB = librte_cfgfile.a\n CFLAGS += -O3\n CFLAGS += $(WERROR_FLAGS)\n CFLAGS += -I$(SRCDIR)/../librte_eal/common/include\n+LDFLAGS += -lrte_log\n \n EXPORT_MAP := rte_cfgfile_version.map\n \ndiff --git a/lib/librte_cfgfile/rte_cfgfile.c b/lib/librte_cfgfile/rte_cfgfile.c\nindex 1ef298592fa5..388415147930 100644\n--- a/lib/librte_cfgfile/rte_cfgfile.c\n+++ b/lib/librte_cfgfile/rte_cfgfile.c\n@@ -9,6 +9,7 @@\n #include <errno.h>\n #include <rte_string_fns.h>\n #include <rte_common.h>\n+#include <rte_log.h>\n \n #include \"rte_cfgfile.h\"\n \n@@ -26,6 +27,12 @@ struct rte_cfgfile {\n \tstruct rte_cfgfile_section *sections;\n };\n \n+static int cfgfile_logtype;\n+\n+#define CFG_LOG(level, fmt, args...)\t\t\t\t\t\\\n+\trte_log(RTE_LOG_ ## level, cfgfile_logtype, \"%s(): \" fmt \"\\n\",\t\\\n+\t\t__func__, ## args)\n+\n /** when we resize a file structure, how many extra entries\n  * for new sections do we add in */\n #define CFG_ALLOC_SECTION_BATCH 8\n@@ -128,7 +135,7 @@ rte_cfgfile_check_params(const struct rte_cfgfile_parameters *params)\n \tunsigned int i;\n \n \tif (!params) {\n-\t\tprintf(\"Error - missing cfgfile parameters\\n\");\n+\t\tCFG_LOG(ERR, \"missing cfgfile parameters\\n\");\n \t\treturn -EINVAL;\n \t}\n \n@@ -141,7 +148,7 @@ rte_cfgfile_check_params(const struct rte_cfgfile_parameters *params)\n \t}\n \n \tif (valid_comment == 0)\t{\n-\t\tprintf(\"Error - invalid comment characters %c\\n\",\n+\t\tCFG_LOG(ERR, \"invalid comment characters %c\\n\",\n \t\t       params->comment_character);\n \t\treturn -ENOTSUP;\n \t}\n@@ -178,7 +185,7 @@ rte_cfgfile_load_with_params(const char *filename, int flags,\n \t\tsize_t len = strnlen(buffer, sizeof(buffer));\n \t\tlineno++;\n \t\tif ((len >= sizeof(buffer) - 1) && (buffer[len-1] != '\\n')) {\n-\t\t\tprintf(\"Error line %d - no \\\\n found on string. \"\n+\t\t\tCFG_LOG(ERR, \" line %d - no \\\\n found on string. \"\n \t\t\t\t\t\"Check if line too long\\n\", lineno);\n \t\t\tgoto error1;\n \t\t}\n@@ -198,8 +205,9 @@ rte_cfgfile_load_with_params(const char *filename, int flags,\n \t\t\t/* section heading line */\n \t\t\tchar *end = memchr(buffer, ']', len);\n \t\t\tif (end == NULL) {\n-\t\t\t\tprintf(\"Error line %d - no terminating ']'\"\n-\t\t\t\t\t\"character found\\n\", lineno);\n+\t\t\t\tCFG_LOG(ERR,\n+\t\t\t\t\t\"line %d - no terminating ']' character found\\n\",\n+\t\t\t\t\tlineno);\n \t\t\t\tgoto error1;\n \t\t\t}\n \t\t\t*end = '\\0';\n@@ -213,8 +221,9 @@ rte_cfgfile_load_with_params(const char *filename, int flags,\n \t\t\tsplit[0] = buffer;\n \t\t\tsplit[1] = memchr(buffer, '=', len);\n \t\t\tif (split[1] == NULL) {\n-\t\t\t\tprintf(\"Error line %d - no '='\"\n-\t\t\t\t\t\"character found\\n\", lineno);\n+\t\t\t\tCFG_LOG(ERR,\n+\t\t\t\t\t\"line %d - no '=' character found\\n\",\n+\t\t\t\t\tlineno);\n \t\t\t\tgoto error1;\n \t\t\t}\n \t\t\t*split[1] = '\\0';\n@@ -236,8 +245,9 @@ rte_cfgfile_load_with_params(const char *filename, int flags,\n \n \t\t\tif (!(flags & CFG_FLAG_EMPTY_VALUES) &&\n \t\t\t\t\t(*split[1] == '\\0')) {\n-\t\t\t\tprintf(\"Error at line %d - cannot use empty \"\n-\t\t\t\t\t\t\t\"values\\n\", lineno);\n+\t\t\t\tCFG_LOG(ERR,\n+\t\t\t\t\t\"line %d - cannot use empty values\\n\",\n+\t\t\t\t\tlineno);\n \t\t\t\tgoto error1;\n \t\t\t}\n \n@@ -397,7 +407,8 @@ int rte_cfgfile_set_entry(struct rte_cfgfile *cfg, const char *sectionname,\n \t\t\t\tsizeof(curr_section->entries[i].value));\n \t\t\treturn 0;\n \t\t}\n-\tprintf(\"Error - entry name doesn't exist\\n\");\n+\n+\tCFG_LOG(ERR, \"entry name doesn't exist\\n\");\n \treturn -EINVAL;\n }\n \n@@ -552,3 +563,10 @@ rte_cfgfile_has_entry(struct rte_cfgfile *cfg, const char *sectionname,\n {\n \treturn rte_cfgfile_get_entry(cfg, sectionname, entryname) != NULL;\n }\n+\n+RTE_INIT(cfgfile_init)\n+{\n+\tcfgfile_logtype = rte_log_register(\"lib.cfgfile\");\n+\tif (cfgfile_logtype >= 0)\n+\t\trte_log_set_level(cfgfile_logtype, RTE_LOG_INFO);\n+}\n",
    "prefixes": [
        "v2",
        "2/3"
    ]
}