get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2218560,
    "url": "http://patchwork.ozlabs.org/api/patches/2218560/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/20260401124128.178799-3-gregor.herburger@linutronix.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": "<20260401124128.178799-3-gregor.herburger@linutronix.de>",
    "list_archive_url": null,
    "date": "2026-04-01T12:40:45",
    "name": "[v2,2/2] cli: flush stdin before enabling cli",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "72012853bb1c26fe5f6b2d2c1473a5fe4c348814",
    "submitter": {
        "id": 93018,
        "url": "http://patchwork.ozlabs.org/api/people/93018/?format=api",
        "name": "Gregor Herburger",
        "email": "gregor.herburger@linutronix.de"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/20260401124128.178799-3-gregor.herburger@linutronix.de/mbox/",
    "series": [
        {
            "id": 498331,
            "url": "http://patchwork.ozlabs.org/api/series/498331/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/uboot/list/?series=498331",
            "date": "2026-04-01T12:40:44",
            "name": "[v2,1/2] console: add console_flush_stdin()",
            "version": 2,
            "mbox": "http://patchwork.ozlabs.org/series/498331/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2218560/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2218560/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<u-boot-bounces@lists.denx.de>",
        "X-Original-To": "incoming@patchwork.ozlabs.org",
        "Delivered-To": "patchwork-incoming@legolas.ozlabs.org",
        "Authentication-Results": [
            "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n secure) header.d=linutronix.de header.i=@linutronix.de header.a=rsa-sha256\n header.s=2020 header.b=W3gwjkKi;\n\tdkim=pass header.d=linutronix.de header.i=@linutronix.de\n header.a=ed25519-sha256 header.s=2020e header.b=OgBiDbAo;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de\n (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de;\n envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org)",
            "phobos.denx.de;\n dmarc=pass (p=none dis=none) header.from=linutronix.de",
            "phobos.denx.de;\n spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de",
            "phobos.denx.de;\n\tdkim=pass (2048-bit key;\n secure) header.d=linutronix.de header.i=@linutronix.de header.b=\"W3gwjkKi\";\n\tdkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de\n header.b=\"OgBiDbAo\";\n\tdkim-atps=neutral",
            "phobos.denx.de;\n dmarc=pass (p=none dis=none) header.from=linutronix.de",
            "phobos.denx.de;\n spf=pass smtp.mailfrom=gregor.herburger@linutronix.de"
        ],
        "Received": [
            "from phobos.denx.de (phobos.denx.de\n [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fm4l3074rz1yFv\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 01 Apr 2026 23:57:19 +1100 (AEDT)",
            "from h2850616.stratoserver.net (localhost [IPv6:::1])\n\tby phobos.denx.de (Postfix) with ESMTP id 687CF8410C;\n\tWed,  1 Apr 2026 14:56:21 +0200 (CEST)",
            "by phobos.denx.de (Postfix, from userid 109)\n id 2D4E683CF5; Wed,  1 Apr 2026 14:43:42 +0200 (CEST)",
            "from galois.linutronix.de (Galois.linutronix.de\n [IPv6:2a0a:51c0:0:12e:550::1])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))\n (No client certificate requested)\n by phobos.denx.de (Postfix) with ESMTPS id BD5E483CE3\n for <u-boot@lists.denx.de>; Wed,  1 Apr 2026 14:43:39 +0200 (CEST)"
        ],
        "X-Spam-Checker-Version": "SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de",
        "X-Spam-Level": "",
        "X-Spam-Status": "No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,\n DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED,\n SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2",
        "From": "Gregor Herburger <gregor.herburger@linutronix.de>",
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de;\n s=2020; t=1775047419;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:cc:mime-version:mime-version:\n content-transfer-encoding:content-transfer-encoding:\n in-reply-to:in-reply-to:references:references;\n bh=Ung0hMLLIT/TEI87gYQXa8dEUzwLq1oOOQK8y7bxVSE=;\n b=W3gwjkKia5ffY7FHV6JPrPSREK6CmnZ3aLroyG2SjpH2QRvWzU7NR16We3rcuFsT4kqRRj\n rpNsyOQYuzPAwyPfdZA8egFZOLFc7NTyRr7onc41ASatTRUnJxwOOIs+8+Db06UeRzR5Z7\n IC3HpiQvUO5MBLQGj2woO+l4ztZAlmVlDeQF1vJt4RxOQFSASJBkFGdt03SQTsD/fC17Lr\n GQyAd6nKiKDSFUUtNxF74+IWr4z5b72QE8FQonNO/WrNlz9G/4Emk31KH9ZVImy3Zh6F0N\n wp7lFZfgixjKiw8heCuPsj6KY7qRXnOXgHUjJF6dGbXIFsY3FW1sfPjM1CBGyA==",
            "v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de;\n s=2020e; t=1775047419;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:cc:mime-version:mime-version:\n content-transfer-encoding:content-transfer-encoding:\n in-reply-to:in-reply-to:references:references;\n bh=Ung0hMLLIT/TEI87gYQXa8dEUzwLq1oOOQK8y7bxVSE=;\n b=OgBiDbAo+Cvb4U6Mh7onXhfO1CeEXHCI3efPLAVtU5RHdqyF4m966AhHcXl+NBxwtIT7/i\n O4/7J2QiLnMRSKCw=="
        ],
        "To": "u-boot@lists.denx.de,\n\tQuentin Schulz <quentin.schulz@cherry.de>",
        "Cc": "Gregor Herburger <gregor.herburger@linutronix.de>,\n Andrew Goodbody <andrew.goodbody@linaro.org>,\n Heiko Schocher <hs@nabladev.com>, Heinrich Schuchardt <xypron.glpk@gmx.de>,\n Ilias Apalodimas <ilias.apalodimas@linaro.org>,\n Jerome Forissier <jerome.forissier@arm.com>,\n \"Kory Maincent (TI.com)\" <kory.maincent@bootlin.com>,\n Mattijs Korpershoek <mkorpershoek@kernel.org>,\n Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>,\n Tom Rini <trini@konsulko.com>",
        "Subject": "[PATCH v2 2/2] cli: flush stdin before enabling cli",
        "Date": "Wed,  1 Apr 2026 14:40:45 +0200",
        "Message-ID": "<20260401124128.178799-3-gregor.herburger@linutronix.de>",
        "In-Reply-To": "<20260401124128.178799-2-gregor.herburger@linutronix.de>",
        "References": "<20260401124128.178799-2-gregor.herburger@linutronix.de>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "X-Mailman-Approved-At": "Wed, 01 Apr 2026 14:56:19 +0200",
        "X-BeenThere": "u-boot@lists.denx.de",
        "X-Mailman-Version": "2.1.39",
        "Precedence": "list",
        "List-Id": "U-Boot discussion <u-boot.lists.denx.de>",
        "List-Unsubscribe": "<https://lists.denx.de/options/u-boot>,\n <mailto:u-boot-request@lists.denx.de?subject=unsubscribe>",
        "List-Archive": "<https://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 <mailto:u-boot-request@lists.denx.de?subject=subscribe>",
        "Errors-To": "u-boot-bounces@lists.denx.de",
        "Sender": "\"U-Boot\" <u-boot-bounces@lists.denx.de>",
        "X-Virus-Scanned": "clamav-milter 0.103.8 at phobos.denx.de",
        "X-Virus-Status": "Clean"
    },
    "content": "Currently there is no possibility to flush stdin after autocommands are\nexecuted. If in the bootcmd the stdin is changed, e.g. from nulldev to\nserial, it could happen that junk characters sit in the fifo and appear\non the cli.\n\nAdd a option to clear stdin before starting the CLI.\n\nSigned-off-by: Gregor Herburger <gregor.herburger@linutronix.de>\n\n---\n\nChanges in v2:\n- add a common console_flush_stdin to console.c\n- replace all caller of while(getchar()) with function call\n\n cmd/Kconfig  | 6 ++++++\n common/cli.c | 4 ++++\n 2 files changed, 10 insertions(+)",
    "diff": "diff --git a/cmd/Kconfig b/cmd/Kconfig\nindex 322ebe600c5..3dfba977544 100644\n--- a/cmd/Kconfig\n+++ b/cmd/Kconfig\n@@ -47,6 +47,12 @@ config HUSH_SELECTABLE\n \tdefault y if HUSH_OLD_PARSER && HUSH_MODERN_PARSER\n endmenu\n \n+config CMDLINE_FLUSH_STDIN\n+\tbool \"Enable flushing input before starting cli\"\n+\thelp\n+\t  When this option is enabled the stdin buffer will be flushed before\n+\t  starting the CLI.\n+\n config CMDLINE_EDITING\n \tbool \"Enable command line editing\"\n \tdefault y\ndiff --git a/common/cli.c b/common/cli.c\nindex 4694a35cd0e..bcc7264d51a 100644\n--- a/common/cli.c\n+++ b/common/cli.c\n@@ -295,6 +295,10 @@ err:\n void cli_loop(void)\n {\n \tbootstage_mark(BOOTSTAGE_ID_ENTER_CLI_LOOP);\n+\n+\tif (IS_ENABLED(CONFIG_CMDLINE_FLUSH_STDIN))\n+\t\tconsole_flush_stdin();\n+\n #if CONFIG_IS_ENABLED(HUSH_PARSER)\n \tif (gd->flags & GD_FLG_HUSH_MODERN_PARSER)\n \t\tparse_and_run_file();\n",
    "prefixes": [
        "v2",
        "2/2"
    ]
}