get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2228791,
    "url": "http://patchwork.ozlabs.org/api/1.1/patches/2228791/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/20260427-fb_gpt-v2-1-9e7fe3c1649a@oss.qualcomm.com/",
    "project": {
        "id": 18,
        "url": "http://patchwork.ozlabs.org/api/1.1/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
    },
    "msgid": "<20260427-fb_gpt-v2-1-9e7fe3c1649a@oss.qualcomm.com>",
    "date": "2026-04-27T12:06:42",
    "name": "[v2,1/4] fastboot: block: Add device selection syntax",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "c4215711691297bd9a8c8c5092b91708447e1746",
    "submitter": {
        "id": 90810,
        "url": "http://patchwork.ozlabs.org/api/1.1/people/90810/?format=api",
        "name": "Balaji Selvanathan",
        "email": "balaji.selvanathan@oss.qualcomm.com"
    },
    "delegate": {
        "id": 117687,
        "url": "http://patchwork.ozlabs.org/api/1.1/users/117687/?format=api",
        "username": "mkorpershoek",
        "first_name": "Mattijs",
        "last_name": "Korpershoek",
        "email": "mkorpershoek@baylibre.com"
    },
    "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/20260427-fb_gpt-v2-1-9e7fe3c1649a@oss.qualcomm.com/mbox/",
    "series": [
        {
            "id": 501635,
            "url": "http://patchwork.ozlabs.org/api/1.1/series/501635/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/uboot/list/?series=501635",
            "date": "2026-04-27T12:06:41",
            "name": "fastboot: block: Add GPT/MBR and device selection",
            "version": 2,
            "mbox": "http://patchwork.ozlabs.org/series/501635/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2228791/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2228791/checks/",
    "tags": {},
    "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 unprotected) header.d=qualcomm.com header.i=@qualcomm.com header.a=rsa-sha256\n header.s=qcppdkim1 header.b=RRcNHmF+;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com\n header.a=rsa-sha256 header.s=google header.b=IsUleudT;\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=none (p=none dis=none) header.from=oss.qualcomm.com",
            "phobos.denx.de;\n spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de",
            "phobos.denx.de;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=qualcomm.com header.i=@qualcomm.com\n header.b=\"RRcNHmF+\";\n\tdkim=pass (2048-bit key;\n unprotected) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com\n header.b=\"IsUleudT\";\n\tdkim-atps=neutral",
            "phobos.denx.de; dmarc=none (p=none dis=none)\n header.from=oss.qualcomm.com",
            "phobos.denx.de; spf=pass\n smtp.mailfrom=balaji.selvanathan@oss.qualcomm.com"
        ],
        "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 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g42P70SXpz1xvV\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 27 Apr 2026 22:07:07 +1000 (AEST)",
            "from h2850616.stratoserver.net (localhost [IPv6:::1])\n\tby phobos.denx.de (Postfix) with ESMTP id 7E78784119;\n\tMon, 27 Apr 2026 14:07:00 +0200 (CEST)",
            "by phobos.denx.de (Postfix, from userid 109)\n id F40D184119; Mon, 27 Apr 2026 14:06:58 +0200 (CEST)",
            "from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com\n [205.220.180.131])\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 ABC7F8407E\n for <u-boot@lists.denx.de>; Mon, 27 Apr 2026 14:06:56 +0200 (CEST)",
            "from pps.filterd (m0279873.ppops.net [127.0.0.1])\n by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id\n 63R8T8Ce2913806\n for <u-boot@lists.denx.de>; Mon, 27 Apr 2026 12:06:55 GMT",
            "from mail-pj1-f70.google.com (mail-pj1-f70.google.com\n [209.85.216.70])\n by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4dt26xhc7x-1\n (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT)\n for <u-boot@lists.denx.de>; Mon, 27 Apr 2026 12:06:55 +0000 (GMT)",
            "by mail-pj1-f70.google.com with SMTP id\n 98e67ed59e1d1-362d9dd9a49so4537550a91.0\n for <u-boot@lists.denx.de>; Mon, 27 Apr 2026 05:06:54 -0700 (PDT)",
            "from hu-bselvana-blr.qualcomm.com\n (blr-bdr-fw-01_GlobalNAT_AllZones-Outside.qualcomm.com. [103.229.18.19])\n by smtp.gmail.com with ESMTPSA id\n 98e67ed59e1d1-36140feea38sm31832910a91.6.2026.04.27.05.06.49\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Mon, 27 Apr 2026 05:06:52 -0700 (PDT)"
        ],
        "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",
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h=\n cc:content-transfer-encoding:content-type:date:from:in-reply-to\n :message-id:mime-version:references:subject:to; s=qcppdkim1; bh=\n xcDfx6D81qrZ42GllMZe+dWFbCCuhCtHPicj+je1RTE=; b=RRcNHmF+nBS5Fshg\n CFScL4W2x9NG2JiZHwZkfhmiGMC2khSgZhd1LVP9yXb7DSK31Id9UPB5/CI5blZj\n nPDdpC3BGC73lLQc8/xUkjIWgUhCsEfmLeYIagrXs/EzeT3rnZjKUpC9PbwZ72oQ\n kHGdebUuY+Ccs2VbwJyg3Eg+DdGVPzQakVqPsyN3rBXg7wP7SqOgsj3THtD1IvO7\n bPS6W+40yK/DjVtiSR7ePs1WSVA8MSItZbzTstcBuJ77N7mnl4qkKPFjpLukTNSl\n 0zWmwb062eAGyA5acQDMQ3Oqja5E2YGk5i9JM3f2NsuN++MqT1kMlt6wetxCCiGf\n PeYpLQ==",
            "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=oss.qualcomm.com; s=google; t=1777291614; x=1777896414; darn=lists.denx.de;\n h=cc:to:in-reply-to:references:message-id:content-transfer-encoding\n :mime-version:subject:date:from:from:to:cc:subject:date:message-id\n :reply-to; bh=xcDfx6D81qrZ42GllMZe+dWFbCCuhCtHPicj+je1RTE=;\n b=IsUleudTpfeKWyujmZuWqekt6Xj0rQiGeoA4RIw0j3D9BBc27f/5ULc5xMHmTsZscF\n 0lC56dtDEAxuy5SWKC2cktJLof/aeLgIxhAvGJpQfipBoojKzW1ctKeJ6J/0+Lio7TvN\n dWQlzZR5Ulvo/eK1MKKidDpQambfCHes48hyLS38oxSNbLnYWfAwr6wy2TrM8mvI5Dit\n j/+DFgwW/tZWE6YH6eLiOKpXmX6jiw0bv2Yd/CwPdhb3J3Fa4dlISn+W/PBP4v1yE6N7\n tt5RUWztSgSHNf/wBImAv0GtiIs1hVPTtVPpSNKbXKZbM65aGL7xBkfDLp/PKT4OUBfg\n q/kQ=="
        ],
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1777291614; x=1777896414;\n h=cc:to:in-reply-to:references:message-id:content-transfer-encoding\n :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to\n :cc:subject:date:message-id:reply-to;\n bh=xcDfx6D81qrZ42GllMZe+dWFbCCuhCtHPicj+je1RTE=;\n b=kYX9Ma81942YX3OnzhnCij7AUUQRaj7afGLCIYDSFgNNOgE0Gf2MdHmdd4EsIMhrXH\n o4jjqlKy4xg5TLtnkIDq6Ms7zN47xBv+T1AFY6DicbVwyZgt4eLPxi9bGFUe2E73U96w\n Hd+bYVp8O55txr5qRPSKqn7ePW/p+u1cHJuEAD+AgDcwoMfJacppsqHFKkG0ltmpISzb\n 1KqulxIepQ8Nd0dCxtz6oTm25llTfFMhvNuG0lS2H2l3Z+wgoVsUj4CZF/efa9TPnJ0Z\n vxNy8lPfVh3C7Lp/EOv5OzgXFD33DntOxNPDTSFPzxtiyBpt/okBDhuczhdiKqTIbB4l\n yBtA==",
        "X-Gm-Message-State": "AOJu0YwDncIGJHpu5nZc9YQ6+YA5wYR7Y4BJ7XVgv0UIrJFMlpc+zLwJ\n yCGpjMRRdLUchkLNkjr4no22241D3LcjQj6qxScsFnYArVN7Ph3rTzYHO2jswe9Tf9AgzMZR8To\n vSuE8zi1UVaUR7Zbdz+FzS9/PKYUfySIbANLrmD2PqwNd2+DY0mOLNalw",
        "X-Gm-Gg": "AeBDievo8HZcBNYR9PycGANTeDmRYMxmN2cYxCRCK2Y2DEAS2c5Wa6yfXqNx+5qat9s\n 4RTa3MNCkp9UhyyO8wFlwu+Y4dBkauZC4bkbvYHMPPcSgVwC6IZN4Z2bU31rOtBN1q6Q1Zbqb3T\n J0BYhDvrgTCiW0QBmVqrDDN/3VXsUXSG4ih6c33/d5Q6z7xHhsEFnQJSd3axphXwWHzfA8woAn/\n l85gcbT1d3wPp3NnjXlT/f8o9pDdKtd0k4rS9cQW0nt7rd+SVV8B+cyY3z4/g8IA+3Gz5WLbkXU\n 6oXLHAE2EJbTm2pOzpEoeQ2ZXUHEA/Ic0Ui/0/3XATHksUdcq61Mmu6rj2ClG4WIM7aijHkPpuI\n ECM7uQ7BwuwMqzIUwuMTNkJufgOewFLlT+MSGbr22yxetz3I+jKILU5thSmIxQeMkjYelY9PlwJ\n FW05d1hf+gCgYLs3pyAd5JarMmJmS4dlxc1wx/Hp70qZxOaOAOTAri6C0F2ESQ",
        "X-Received": [
            "by 2002:a17:90b:5112:b0:35c:30a8:32a with SMTP id\n 98e67ed59e1d1-361403f4e8cmr42633957a91.9.1777291613773;\n Mon, 27 Apr 2026 05:06:53 -0700 (PDT)",
            "by 2002:a17:90b:5112:b0:35c:30a8:32a with SMTP id\n 98e67ed59e1d1-361403f4e8cmr42633872a91.9.1777291612782;\n Mon, 27 Apr 2026 05:06:52 -0700 (PDT)"
        ],
        "From": "Balaji Selvanathan <balaji.selvanathan@oss.qualcomm.com>",
        "Date": "Mon, 27 Apr 2026 17:36:42 +0530",
        "Subject": "[PATCH v2 1/4] fastboot: block: Add device selection syntax",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=\"utf-8\"",
        "Content-Transfer-Encoding": "7bit",
        "Message-Id": "<20260427-fb_gpt-v2-1-9e7fe3c1649a@oss.qualcomm.com>",
        "References": "<20260427-fb_gpt-v2-0-9e7fe3c1649a@oss.qualcomm.com>",
        "In-Reply-To": "<20260427-fb_gpt-v2-0-9e7fe3c1649a@oss.qualcomm.com>",
        "To": "u-boot@lists.denx.de",
        "Cc": "Mattijs Korpershoek <mkorpershoek@kernel.org>,\n Tom Rini <trini@konsulko.com>, Heiko Schocher <hs@nabladev.com>,\n Neil Armstrong <neil.armstrong@linaro.org>,\n Dmitrii Merkurev <dimorinny@google.com>,\n Adrian Freihofer <adrian.freihofer@siemens.com>,\n Peng Fan <peng.fan@nxp.com>, Jaehoon Chung <jh80.chung@samsung.com>,\n Ariel D'Alessandro <ariel.dalessandro@collabora.com>,\n Balaji Selvanathan <balaji.selvanathan@oss.qualcomm.com>",
        "X-Mailer": "b4 0.14.3",
        "X-Developer-Signature": "v=1; a=ed25519-sha256; t=1777291604; l=4085;\n i=balaji.selvanathan@oss.qualcomm.com; s=20260213; h=from:subject:message-id;\n bh=2jyIUq/p3c/U+CuKZp5vOyIHrJtYn/zQ6ymWpe+3Fhg=;\n b=ZAi/9SfCmRUbTTVdvCvyJHnvr5GOirJ0A7sh/lCXY9uCTULePSIewgwR20+kL6+nYGyEAYsSi\n QxSgMynZpVOBwU/xJ1KEt0+ZD59GCu66MCrX+5JG+2bTVYxX8Gxi0OH",
        "X-Developer-Key": "i=balaji.selvanathan@oss.qualcomm.com; a=ed25519;\n pk=CDpYiUU3SH7KGEtsBvY2tBGPiWfMxqWJF0p2LftOfnc=",
        "X-Proofpoint-GUID": "jEYfGrgPSgxCtrlpVVb-y1bayyvehJFp",
        "X-Proofpoint-ORIG-GUID": "jEYfGrgPSgxCtrlpVVb-y1bayyvehJFp",
        "X-Proofpoint-Spam-Details-Enc": "AW1haW4tMjYwNDI3MDEyOSBTYWx0ZWRfX+vJeesiu/lEn\n mzrk0X/giUM8D2u3yqTpc1l6BvQQxC4iGH2u+2S/heZHavTeOqcFDm4NJyc/qyo5dFqyGq7wCQ+\n c8iQHU/gZ92/c0LdSn/kTvRIk7wHPislU7cra9Zg9oA2Co8f0IKQnTrh9uxbuO+SzfLzBv4kZv2\n qcZ9QM9vDmZ8L4+a2YS+kkzHILHWBrpYjs1JZuS6FO4TxiJQ6vtsLMAdm5FV958Ui4C2NgZ2Deb\n YQ1W84EIYq/k86qq+9W6A3bG6dMRiJpHWLTVw/Su+Y5t/kAgkecu8kRHoFdsSRdp+/yhwAb66Rg\n cHAsqvX/3ym0k4eTEAC8hnpw+qdMd46cKTzGmjzqNrT93kAsg9yFIdnNmiOTHFkVrK/+7DPnwC5\n BRMVzM4WoQA97rGXT1APsCa94ZHTzXQwqdkLlaNm//BoM2V1gcrbyIF2HsMWUi0Bsc6W3X1b7Vl\n JBPZY2hpDbiSvLbH9rg==",
        "X-Authority-Analysis": "v=2.4 cv=FM8rAeos c=1 sm=1 tr=0 ts=69ef515f cx=c_pps\n a=0uOsjrqzRL749jD1oC5vDA==:117 a=Ou0eQOY4+eZoSc0qltEV5Q==:17\n a=IkcTkHD0fZMA:10 a=A5OVakUREuEA:10 a=s4-Qcg_JpJYA:10\n a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=rJkE3RaqiGZ5pbrm-msn:22\n a=EUspDBNiAAAA:8 a=ur9GPcVNT4V7s1MEKRwA:9 a=QEXdDO2ut3YA:10\n a=mQ_c8vxmzFEMiUWkPHU9:22",
        "X-Proofpoint-Virus-Version": "vendor=baseguard\n engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49\n definitions=2026-04-27_03,2026-04-21_02,2025-10-01_01",
        "X-Proofpoint-Spam-Details": "rule=outbound_notspam policy=outbound score=0\n lowpriorityscore=0 suspectscore=0 adultscore=0 bulkscore=0 phishscore=0\n spamscore=0 malwarescore=0 priorityscore=1501 impostorscore=0 clxscore=1015\n classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0\n reason=mlx scancount=1 engine=8.22.0-2604200000 definitions=main-2604270129",
        "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": "Implement device selection syntax allowing users to specify the\ntarget block device using \"N:partition\" format, where N is the\ndevice number. When no device is specified, the default from\nCONFIG_FASTBOOT_FLASH_BLOCK_DEVICE_ID is used.\n\nModify fastboot_block_get_part_info() to use the new parsing\nfunction, enabling operations like \"fastboot flash 0:boot boot.img\"\nto write to specific devices while maintaining backward compatibility\nwith the existing \"fastboot flash boot boot.img\" syntax.\n\nExample usage:\n  fastboot flash 0:boot boot.img      # Flash to device 0\n  fastboot flash 1:system system.img  # Flash to device 1\n  fastboot flash boot boot.img        # Use default device\n\nSigned-off-by: Balaji Selvanathan <balaji.selvanathan@oss.qualcomm.com>\n---\nChanges in v2:\n- Newly created in v2\n- Has only device selection syntax related changes\n---\n drivers/fastboot/fb_block.c | 53 +++++++++++++++++++++++++++++++++++++++++----\n 1 file changed, 49 insertions(+), 4 deletions(-)",
    "diff": "diff --git a/drivers/fastboot/fb_block.c b/drivers/fastboot/fb_block.c\nindex 51d1abb18c7..061ffd930a5 100644\n--- a/drivers/fastboot/fb_block.c\n+++ b/drivers/fastboot/fb_block.c\n@@ -11,6 +11,7 @@\n #include <image-sparse.h>\n #include <malloc.h>\n #include <part.h>\n+#include <vsprintf.h>\n \n /**\n  * FASTBOOT_MAX_BLOCKS_ERASE - maximum blocks to erase per derase call\n@@ -124,6 +125,44 @@ static lbaint_t fb_block_sparse_reserve(struct sparse_storage *info,\n \treturn blkcnt;\n }\n \n+/**\n+ * parse_device_partition() - Parse and validate device:partition format\n+ * @part_name: Input string in format \"N:partition\" or \"partition\"\n+ * @device: Output device number\n+ * @partition_name: Output partition name pointer (can be NULL)\n+ *\n+ * Parses the input string to extract device number and partition name.\n+ * If no device is specified, uses the default from config.\n+ * Returns: 0 on success, -EINVAL if format is invalid\n+ */\n+static int parse_device_partition(const char *part_name, int *device,\n+\t\t\t\t  const char **partition_name)\n+{\n+\tconst char *colon_pos;\n+\n+\t*device = config_opt_enabled(CONFIG_FASTBOOT_FLASH_BLOCK,\n+\t\t\t\t     CONFIG_FASTBOOT_FLASH_BLOCK_DEVICE_ID, -1);\n+\n+\t/* Check for colon in partition name */\n+\tcolon_pos = strchr(part_name, ':');\n+\n+\t/* Reject invalid format like \":partition\" */\n+\tif (colon_pos && colon_pos == part_name)\n+\t\treturn -EINVAL;\n+\n+\t/* Override if device:partition format detected */\n+\tif (colon_pos && colon_pos > part_name) {\n+\t\t*device = simple_strtoul(part_name, NULL, 10);\n+\t\tif (partition_name)\n+\t\t\t*partition_name = colon_pos + 1;\n+\t} else {\n+\t\tif (partition_name)\n+\t\t\t*partition_name = part_name;\n+\t}\n+\n+\treturn 0;\n+}\n+\n int fastboot_block_get_part_info(const char *part_name,\n \t\t\t\t struct blk_desc **dev_desc,\n \t\t\t\t struct disk_partition *part_info,\n@@ -133,25 +172,31 @@ int fastboot_block_get_part_info(const char *part_name,\n \tconst char *interface = config_opt_enabled(CONFIG_FASTBOOT_FLASH_BLOCK,\n \t\t\t\t\t\t   CONFIG_FASTBOOT_FLASH_BLOCK_INTERFACE_NAME,\n \t\t\t\t\t\t   NULL);\n-\tconst int device = config_opt_enabled(CONFIG_FASTBOOT_FLASH_BLOCK,\n-\t\t\t\t\t      CONFIG_FASTBOOT_FLASH_BLOCK_DEVICE_ID, -1);\n+\tint device;\n+\tconst char *partition_name;\n \n \tif (!part_name || !strcmp(part_name, \"\")) {\n \t\tfastboot_fail(\"partition not given\", response);\n \t\treturn -ENOENT;\n \t}\n+\n \tif (!interface || !strcmp(interface, \"\")) {\n \t\tfastboot_fail(\"block interface isn't provided\", response);\n \t\treturn -EINVAL;\n \t}\n \n+\tif (parse_device_partition(part_name, &device, &partition_name) < 0) {\n+\t\tfastboot_fail(\"invalid partition name format\", response);\n+\t\treturn -EINVAL;\n+\t}\n+\n \t*dev_desc = blk_get_dev(interface, device);\n-\tif (!dev_desc) {\n+\tif (!*dev_desc) {\n \t\tfastboot_fail(\"no such device\", response);\n \t\treturn -ENODEV;\n \t}\n \n-\tret = part_get_info_by_name(*dev_desc, part_name, part_info);\n+\tret = part_get_info_by_name(*dev_desc, partition_name, part_info);\n \tif (ret < 0)\n \t\tfastboot_fail(\"failed to get partition info\", response);\n \n",
    "prefixes": [
        "v2",
        "1/4"
    ]
}