Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/956563/?format=api
{ "id": 956563, "url": "http://patchwork.ozlabs.org/api/patches/956563/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/20180811152820.26817-6-xypron.glpk@gmx.de/", "project": { "id": 18, "url": "http://patchwork.ozlabs.org/api/projects/18/?format=api", "name": "U-Boot", "link_name": "uboot", "list_id": "u-boot.lists.denx.de", "list_email": "u-boot@lists.denx.de", "web_url": null, "scm_url": null, "webscm_url": null, "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20180811152820.26817-6-xypron.glpk@gmx.de>", "list_archive_url": null, "date": "2018-08-11T15:28:10", "name": "[U-Boot,05/15] lib: vsprintf: correct printing of Unicode strings", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "792b004b0a6f674ce12a993d75e42749b187655a", "submitter": { "id": 61270, "url": "http://patchwork.ozlabs.org/api/people/61270/?format=api", "name": "Heinrich Schuchardt", "email": "xypron.glpk@gmx.de" }, "delegate": { "id": 3400, "url": "http://patchwork.ozlabs.org/api/users/3400/?format=api", "username": "agraf", "first_name": "Alexander", "last_name": "Graf", "email": "agraf@suse.de" }, "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/20180811152820.26817-6-xypron.glpk@gmx.de/mbox/", "series": [ { "id": 60397, "url": "http://patchwork.ozlabs.org/api/series/60397/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/list/?series=60397", "date": "2018-08-11T15:28:06", "name": "efi_loader: EFI_UNICODE_COLLATION_PROTOCOL", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/60397/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/956563/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/956563/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<u-boot-bounces@lists.denx.de>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": "patchwork-incoming@bilbo.ozlabs.org", "Authentication-Results": [ "ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.denx.de\n\t(client-ip=81.169.180.215; helo=lists.denx.de;\n\tenvelope-from=u-boot-bounces@lists.denx.de;\n\treceiver=<UNKNOWN>)", "ozlabs.org;\n\tdmarc=none (p=none dis=none) header.from=gmx.de" ], "Received": [ "from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 41nmH762Kdz9s89\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSun, 12 Aug 2018 01:33:39 +1000 (AEST)", "by lists.denx.de (Postfix, from userid 105)\n\tid 8488FC21C51; Sat, 11 Aug 2018 15:31:15 +0000 (UTC)", "from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id 21BC2C21E3E;\n\tSat, 11 Aug 2018 15:28:52 +0000 (UTC)", "by lists.denx.de (Postfix, from userid 105)\n\tid 15055C21C51; Sat, 11 Aug 2018 15:28:46 +0000 (UTC)", "from mout.gmx.net (mout.gmx.net [212.227.17.21])\n\tby lists.denx.de (Postfix) with ESMTPS id A0BB5C21BE5\n\tfor <u-boot@lists.denx.de>; Sat, 11 Aug 2018 15:28:45 +0000 (UTC)", "from LT02.fritz.box ([88.152.14.153]) by mail.gmx.com (mrgmx102\n\t[212.227.17.174]) with ESMTPSA (Nemesis) id 0MIPhr-1fkP5A0lcV-004FEG;\n\tSat, 11 Aug 2018 17:28:43 +0200" ], "X-Spam-Checker-Version": "SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de", "X-Spam-Level": "", "X-Spam-Status": "No, score=0.0 required=5.0 tests=FREEMAIL_FROM\n\tautolearn=unavailable autolearn_force=no version=3.4.0", "From": "Heinrich Schuchardt <xypron.glpk@gmx.de>", "To": "Alexander Graf <agraf@suse.de>", "Date": "Sat, 11 Aug 2018 17:28:10 +0200", "Message-Id": "<20180811152820.26817-6-xypron.glpk@gmx.de>", "X-Mailer": "git-send-email 2.18.0", "In-Reply-To": "<20180811152820.26817-1-xypron.glpk@gmx.de>", "References": "<20180811152820.26817-1-xypron.glpk@gmx.de>", "X-Provags-ID": "V03:K1:vkVYR/Kejv58Bg11RL9p/7HsHWfZD/IWCqnus4d17/Y71B4VV5T\n\t8SLMq7u6pD+pEPRm6xANAHbVzVN7lNwo53DzdCCMiHW36uU1nqH4YHk7ZTWn8sGnXwpbi5P\n\tb1Gz+LCCwTPSavl1nYty4NeCUUjCKCoijEARNAapPyNDM6hh3ryl7aGbz0XX+n7utNrhPh1\n\tQofUyNav0pe9H+2tRxE0w==", "X-UI-Out-Filterresults": "notjunk:1; V01:K0:rB2B8JuJgmM=:JWeW3sA6tJYOFVaZIWbciq\n\tab19zjFKK2GRl+xpzuuL2+TjdcyIsS/VZQ/fGJ5YikMOYwbqy2HSB0rCfndngfAz74nxFJusq\n\tOxDmY9jOWit8HPloplC6ENT6C11fTJPqih/W40obHstOfxCsYJGcXFMYd+sQ6wYUuQmVUv3fY\n\tyIbtyciMNgLr5Q4/F6tIePfpjCYNY4ZM/H13uemWJRwkd6LPPVXFE8JRDVjjL6pZxOdfQ/wVB\n\t03qNEfA7wiNIarPuflPOjamomxNEjv3uOGf4EnAtCWKmrogaZfVBSpglkSIRSckpmu7cVEqSB\n\t6JjivVk/+lo5zLTdNuAC6kSuiJEKZETH2K9yjGGLESD1dzVxjfRKPCBs+/lIOrjW13Ke4exD8\n\t0/CbVvMUs6rLhiuFpJ44Ci3utxMoz16Y+6wiVGFujd4sTyPxjiPYNwTjqn3/RQxcNXOu0x61s\n\tJHXc9vFN7K8or8WZgY5l6GmzdU4lYQD2NtxFV+adJjJAJfcNIGKbz5yBcaXd143hQIE2WZetH\n\tcHYu5GSawEeONxOAgj3CqKt1lm2lFkmTiuNZp44skbRjbFGNno5UuaiGC2VD9TovMV5fedLpM\n\t2I9sJKK6wOwcXdl8I5etXAKrnkDWLsInPBZXZt/BdkR/yG5qn7gcBfRX6Prbj1iyhCX6xJb+r\n\tkdq75h/EbHFCPTRV1+4KEWxoclt0TGwnnBTjjutN67dfIejAzRWqKB+jo4JMCBQqSLS1/jOIe\n\t9whYLHanzgtAeFwp7OtCLa43YcvNlh61yMUSGGE5wlJW1ue1E4RA+dQczyY=", "Cc": "Heinrich Schuchardt <xypron.glpk@gmx.de>, u-boot@lists.denx.de", "Subject": "[U-Boot] [PATCH 05/15] lib: vsprintf: correct printing of Unicode\n\tstrings", "X-BeenThere": "u-boot@lists.denx.de", "X-Mailman-Version": "2.1.18", "Precedence": "list", "List-Id": "U-Boot discussion <u-boot.lists.denx.de>", "List-Unsubscribe": "<https://lists.denx.de/options/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=unsubscribe>", "List-Archive": "<http://lists.denx.de/pipermail/u-boot/>", "List-Post": "<mailto:u-boot@lists.denx.de>", "List-Help": "<mailto:u-boot-request@lists.denx.de?subject=help>", "List-Subscribe": "<https://lists.denx.de/listinfo/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=subscribe>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=\"utf-8\"", "Content-Transfer-Encoding": "base64", "Errors-To": "u-boot-bounces@lists.denx.de", "Sender": "\"U-Boot\" <u-boot-bounces@lists.denx.de>" }, "content": "The width and precision of the printf() function refer to the number of\ncharacters not to the number of bytes printed.\n\nSigned-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>\n---\n lib/vsprintf.c | 22 +++++++++++++---------\n 1 file changed, 13 insertions(+), 9 deletions(-)", "diff": "diff --git a/lib/vsprintf.c b/lib/vsprintf.c\nindex a07128ad96..b7eb9d5f5e 100644\n--- a/lib/vsprintf.c\n+++ b/lib/vsprintf.c\n@@ -280,18 +280,22 @@ static char *string16(char *buf, char *end, u16 *s, int field_width,\n \t\tint precision, int flags)\n {\n \tu16 *str = s ? s : L\"<NULL>\";\n-\tint utf16_len = u16_strnlen(str, precision);\n-\tu8 utf8[utf16_len * MAX_UTF8_PER_UTF16];\n-\tint utf8_len, i;\n-\n-\tutf8_len = utf16_to_utf8(utf8, str, utf16_len) - utf8;\n+\tssize_t i, len = utf16_strnlen(str, precision);\n \n \tif (!(flags & LEFT))\n-\t\twhile (utf8_len < field_width--)\n+\t\tfor (; len < field_width; --field_width)\n \t\t\tADDCH(buf, ' ');\n-\tfor (i = 0; i < utf8_len; ++i)\n-\t\tADDCH(buf, utf8[i]);\n-\twhile (utf8_len < field_width--)\n+\tfor (i = 0; i < len; ++i) {\n+\t\ts32 code = utf16_get((const u16 **)&str);\n+\n+\t\tif (code < 0) {\n+\t\t\tcode = '?';\n+\t\t\tif (*str)\n+\t\t\t\t++str;\n+\t\t}\n+\t\tutf8_put(code, &buf);\n+\t}\n+\tfor (; i < field_width; --field_width)\n \t\tADDCH(buf, ' ');\n \treturn buf;\n }\n", "prefixes": [ "U-Boot", "05/15" ] }