get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2218392,
    "url": "http://patchwork.ozlabs.org/api/patches/2218392/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linux-cifs-client/patch/20260401072912.355072-9-huiwen.he@linux.dev/",
    "project": {
        "id": 12,
        "url": "http://patchwork.ozlabs.org/api/projects/12/?format=api",
        "name": "Linux CIFS Client",
        "link_name": "linux-cifs-client",
        "list_id": "linux-cifs.vger.kernel.org",
        "list_email": "linux-cifs@vger.kernel.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": "",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20260401072912.355072-9-huiwen.he@linux.dev>",
    "list_archive_url": null,
    "date": "2026-04-01T07:29:08",
    "name": "[v2,08/12] smb/client: annotate smberr.h with POSIX error codes",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "15a920b76057f352ae24dc85ec4de9bf45f0c1a6",
    "submitter": {
        "id": 93029,
        "url": "http://patchwork.ozlabs.org/api/people/93029/?format=api",
        "name": null,
        "email": "huiwen.he@linux.dev"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/linux-cifs-client/patch/20260401072912.355072-9-huiwen.he@linux.dev/mbox/",
    "series": [
        {
            "id": 498285,
            "url": "http://patchwork.ozlabs.org/api/series/498285/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/linux-cifs-client/list/?series=498285",
            "date": "2026-04-01T07:29:08",
            "name": "smb: improve search speed of SMB1 maperror",
            "version": 2,
            "mbox": "http://patchwork.ozlabs.org/series/498285/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2218392/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2218392/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "\n <linux-cifs+bounces-10613-incoming=patchwork.ozlabs.org@vger.kernel.org>",
        "X-Original-To": [
            "incoming@patchwork.ozlabs.org",
            "linux-cifs@vger.kernel.org"
        ],
        "Delivered-To": "patchwork-incoming@legolas.ozlabs.org",
        "Authentication-Results": [
            "legolas.ozlabs.org;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256\n header.s=key1 header.b=P6+sJo6l;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=172.105.105.114; helo=tor.lore.kernel.org;\n envelope-from=linux-cifs+bounces-10613-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)",
            "smtp.subspace.kernel.org;\n\tdkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev\n header.b=\"P6+sJo6l\"",
            "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=91.218.175.185",
            "smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=linux.dev",
            "smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=linux.dev"
        ],
        "Received": [
            "from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])\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 4flxXn2mycz1xtJ\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 01 Apr 2026 18:32:57 +1100 (AEDT)",
            "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby tor.lore.kernel.org (Postfix) with ESMTP id 4C7A530364E9\n\tfor <incoming@patchwork.ozlabs.org>; Wed,  1 Apr 2026 07:32:54 +0000 (UTC)",
            "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 73DF739659A;\n\tWed,  1 Apr 2026 07:30:48 +0000 (UTC)",
            "from out-185.mta0.migadu.com (out-185.mta0.migadu.com\n [91.218.175.185])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id 2714A3939B6\n\tfor <linux-cifs@vger.kernel.org>; Wed,  1 Apr 2026 07:30:45 +0000 (UTC)"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1775028648; cv=none;\n b=HcYosnzla3tNkl3jPWJq8LNkFq88fMlHcaZMs3wxMV0BzYaGas6eD/Lg3XZ2WIZCNAWjFKdvXvwoWmxXttild5m1gqZkHq7d6cbhFqT9K74vIeDRM3snjhpZvulgC5rLVFT83cZnDJ5M2nR3O+sXdaEp5+vUA+nS9/ngtOGLytQ=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1775028648; c=relaxed/simple;\n\tbh=Av+kCMgmJKm1l5YSQ2/wlCBRsu+vKUaaKoFPPljprKg=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version;\n b=IuuNOqH5YPDqY6zG52/Av/xjAClox1rKU7Jg9nRZZ1VbH1kQucwhiPiHFzWKc4GcX4HX9x0Oswz+NzMBuhET66EVt8ibinvnN0y7RHRrSx4pw/Oxi/jdaeLP8jatGR4z8zSFeTttK+nR1WP2wCmPHYWsYKRfq2MsgLNjha8JGDw=",
        "ARC-Authentication-Results": "i=1; smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=linux.dev;\n spf=pass smtp.mailfrom=linux.dev;\n dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev\n header.b=P6+sJo6l; arc=none smtp.client-ip=91.218.175.185",
        "X-Report-Abuse": "Please report any abuse attempt to abuse@migadu.com and\n include these headers.",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1;\n\tt=1775028644;\n\th=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n\t to:to:cc:cc:mime-version:mime-version:\n\t content-transfer-encoding:content-transfer-encoding:\n\t in-reply-to:in-reply-to:references:references;\n\tbh=Zt/EyGB58I/0MClPQKm2XMSdIrJsLfIw5LENoccuS9Y=;\n\tb=P6+sJo6lkmi6UavHXZun9evHDj79CmojQn/zfR42yZ2PeaCpb35JI/Q9zt0TbpNOIEZlX0\n\tvWnsT+P3Yu2/avK8UCHSUvsRp1Vsq7Gpl+kIhkivnzB8+D8EqN5ppIfG2k6Pcnl/0LDghi\n\tyMK2Z+7bajYVjytLJbdzJ+2UkJgMZ80=",
        "From": "huiwen.he@linux.dev",
        "To": "smfrench@gmail.com,\n\tlinkinjeon@kernel.org,\n\tpc@manguebit.org,\n\tronniesahlberg@gmail.com,\n\tsprasad@microsoft.com,\n\ttom@talpey.com,\n\tbharathsm@microsoft.com,\n\tsenozhatsky@chromium.org,\n\tdhowells@redhat.com,\n\tchenxiaosong@kylinos.cn,\n\tchenxiaosong@chenxiaosong.com,\n\ttangyouling@kylinos.cn",
        "Cc": "linux-cifs@vger.kernel.org,\n\tHuiwen He <hehuiwen@kylinos.cn>",
        "Subject": "[PATCH v2 08/12] smb/client: annotate smberr.h with POSIX error codes",
        "Date": "Wed,  1 Apr 2026 07:29:08 +0000",
        "Message-ID": "<20260401072912.355072-9-huiwen.he@linux.dev>",
        "In-Reply-To": "<20260401072912.355072-1-huiwen.he@linux.dev>",
        "References": "<20260401072912.355072-1-huiwen.he@linux.dev>",
        "Precedence": "bulk",
        "X-Mailing-List": "linux-cifs@vger.kernel.org",
        "List-Id": "<linux-cifs.vger.kernel.org>",
        "List-Subscribe": "<mailto:linux-cifs+subscribe@vger.kernel.org>",
        "List-Unsubscribe": "<mailto:linux-cifs+unsubscribe@vger.kernel.org>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "X-Migadu-Flow": "FLOW_OUT"
    },
    "content": "From: Huiwen He <hehuiwen@kylinos.cn>\n\nAnnotate SMB1 error definitions in smberr.h with their corresponding\nPOSIX error codes.\n\nTo facilitate automated processing and ensure consistent formatting,\nexisting inline comments (/* ... */) in smberr.h were first moved to\nthe lines preceding the #define statements.\n\nThis provides the source data for generating sorted mapping tables,\nallowing the implementation of binary search for faster error mapping\nlookups in later commits.\n\nThe annotations were performed based on the manual\nmapping_table_ERRDOS[] and mapping_table_ERRSRV[] arrays in\nsmb1maperror.c using the following python script:\n\n\t#!/usr/bin/env python3\n\timport re\n\timport os\n\n\tMAP_FILE = \"fs/smb/client/smb1maperror.c\"\n\tSMBERR_FILE = \"fs/smb/client/smberr.h\"\n\n\tdef get_mappings():\n\t    mappings = {}\n\t    if not os.path.exists(MAP_FILE):\n\t\treturn mappings\n\t    with open(MAP_FILE, \"r\") as f:\n\t\tcontent = f.read()\n\t    for table in [\"mapping_table_ERRDOS\", \"mapping_table_ERRSRV\"]:\n\t\tpattern = (\n\t\t    rf'static const struct smb_to_posix_error {table}\\[\\] = '\n\t\t    r'\\{([\\s\\S]+?)\\};'\n\t\t)\n\t\tmatch = re.search(pattern, content)\n\t\tif match:\n\t\t    entry_pattern = (\n\t\t\tr'\\{\\s*([A-Za-z0-9_]+)\\s*,\\s*'\n\t\t\tr'(-[A-Z0-9_]+)\\s*\\}'\n\t\t    )\n\t\t    entries = re.findall(entry_pattern, match.group(1))\n\t\t    for name, posix in entries:\n\t\t\tif name != \"0\":\n\t\t\t    mappings[name] = posix\n\t    return mappings\n\n\tdef format_comment(comment_lines):\n\t    \"\"\"\n\t    Formats comment lines to comply with Linux kernel coding style.\n\t    Single-line comments remain on one line.\n\t    Multi-line comments use the standard block format.\n\t    \"\"\"\n\t    raw_text = []\n\t    for line in comment_lines:\n\t\tline = line.strip()\n\t\tif line.startswith('/*'):\n\t\t    line = line[2:]\n\t\tif line.endswith('*/'):\n\t\t    line = line[:-2]\n\t\tline = line.lstrip(' *').strip()\n\t\tif line:\n\t\t    raw_text.append(line)\n\n\t    if not raw_text:\n\t\treturn []\n\n\t    # If it's a single line of text, keep it simple\n\t    if len(raw_text) == 1:\n\t\treturn [f\"/* {raw_text[0]} */\"]\n\n\t    # Multi-line: Standard Kernel Block Comment Format\n\t    formatted = [\"/*\"]\n\t    for text in raw_text:\n\t\tformatted.append(f\" * {text}\")\n\t    formatted.append(\" */\")\n\t    return formatted\n\n\tdef fix_content(content, mappings):\n\t    lines = content.splitlines()\n\t    new_lines, i = [], 0\n\t    while i < len(lines):\n\t\tline = lines[i]\n\t\t# Match #define with inline comment\n\t\tdefine_re = (\n\t\t    r'^(\\s*#define\\s+([A-Za-z0-9_]+)\\s+'\n\t\t    r'[^\\s/]+)\\s*/\\*'\n\t\t)\n\t\tmatch = re.match(define_re, line)\n\t\tif match:\n\t\t    prefix, name = match.group(1), match.group(2)\n\n\t\t    # Extract full comment block\n\t\t    comment_block = [line[line.find('/*'):].strip()]\n\t\t    if '*/' not in line:\n\t\t\twhile i + 1 < len(lines):\n\t\t\t    i += 1\n\t\t\t    comment_block.append(lines[i].strip())\n\t\t\t    if '*/' in lines[i]:\n\t\t\t\tbreak\n\n\t\t    # Format and add comment\n\t\t    new_lines.extend(format_comment(comment_block))\n\n\t\t    # Add define with tab-separated POSIX code\n\t\t    new_define = prefix.rstrip()\n\t\t    if name in mappings:\n\t\t\tnew_define += '\\t// ' + mappings[name]\n\t\t    new_lines.append(new_define)\n\t\telse:\n\t\t    no_comment_re = (\n\t\t\tr'^(\\s*#define\\s+([A-Za-z0-9_]+)\\s+'\n\t\t\tr'[^\\s/]+)\\s*$'\n\t\t    )\n\t\t    match_no_comment = re.match(no_comment_re, line)\n\t\t    if match_no_comment:\n\t\t\tprefix = match_no_comment.group(1)\n\t\t\tname = match_no_comment.group(2)\n\t\t\tnew_define = prefix.rstrip()\n\t\t\tif name in mappings:\n\t\t\t    new_define += '\\t// ' + mappings[name]\n\t\t\tnew_lines.append(new_define)\n\t\t    else:\n\t\t\tnew_lines.append(line)\n\t\ti += 1\n\t    return '\\n'.join(new_lines)\n\n\tif __name__ == \"__main__\":\n\t    m = get_mappings()\n\t    if os.path.exists(SMBERR_FILE):\n\t\twith open(SMBERR_FILE, \"r\") as f:\n\t\t    content = f.read()\n\t\tfixed = fix_content(content, m)\n\t\twith open(SMBERR_FILE, \"w\") as f:\n\t\t    f.write(fixed + '\\n')\n\t\tprint(f\"Successfully processed {SMBERR_FILE}\")\n\nSigned-off-by: Huiwen He <hehuiwen@kylinos.cn>\nReviewed-by: ChenXiaoSong <chenxiaosong@kylinos.cn>\n---\n fs/smb/client/smberr.h | 398 ++++++++++++++++++++++++++---------------\n 1 file changed, 256 insertions(+), 142 deletions(-)",
    "diff": "diff --git a/fs/smb/client/smberr.h b/fs/smb/client/smberr.h\nindex 6fb63f9e9a95..a848b6ad987a 100644\n--- a/fs/smb/client/smberr.h\n+++ b/fs/smb/client/smberr.h\n@@ -9,11 +9,16 @@\n  *\n  */\n \n-#define SUCCESS\t0x00\t/* The request was successful. */\n-#define ERRDOS\t0x01\t/* Error is from the core DOS operating system set */\n-#define ERRSRV\t0x02\t/* Error is generated by the file server daemon */\n-#define ERRHRD\t0x03\t/* Error is a hardware error. */\n-#define ERRCMD\t0xFF\t/* Command was not in the \"SMB\" format. */\n+/* The request was successful. */\n+#define SUCCESS\t0x00\n+/* Error is from the core DOS operating system set */\n+#define ERRDOS\t0x01\n+/* Error is generated by the file server daemon */\n+#define ERRSRV\t0x02\n+/* Error is a hardware error. */\n+#define ERRHRD\t0x03\n+/* Command was not in the \"SMB\" format. */\n+#define ERRCMD\t0xFF\n \n /* The following error codes may be generated with the SUCCESS error class.*/\n \n@@ -21,151 +26,260 @@\n \n /* The following error codes may be generated with the ERRDOS error class.*/\n \n-#define ERRbadfunc\t\t1\t/* Invalid function. The server did not\n-\t\t\t\t\t   recognize or could not perform a\n-\t\t\t\t\t   system call generated by the server,\n-\t\t\t\t\t   e.g., set the DIRECTORY attribute on\n-\t\t\t\t\t   a data file, invalid seek mode. */\n-#define ERRbadfile\t\t2\t/* File not found. The last component\n-\t\t\t\t\t   of a file's pathname could not be\n-\t\t\t\t\t   found. */\n-#define ERRbadpath\t\t3\t/* Directory invalid. A directory\n-\t\t\t\t\t   component in a pathname could not be\n-\t\t\t\t\t   found. */\n-#define ERRnofids\t\t4\t/* Too many open files. The server has\n-\t\t\t\t\t   no file handles available. */\n-#define ERRnoaccess\t\t5\t/* Access denied, the client's context\n-\t\t\t\t\t   does not permit the requested\n-\t\t\t\t\t   function. This includes the\n-\t\t\t\t\t   following conditions: invalid rename\n-\t\t\t\t\t   command, write to Fid open for read\n-\t\t\t\t\t   only, read on Fid open for write\n-\t\t\t\t\t   only, attempt to delete a non-empty\n-\t\t\t\t\t   directory */\n-#define ERRbadfid\t\t6\t/* Invalid file handle. The file handle\n-\t\t\t\t\t   specified was not recognized by the\n-\t\t\t\t\t   server. */\n-#define ERRbadmcb\t\t7\t/* Memory control blocks destroyed. */\n-#define ERRnomem\t\t8\t/* Insufficient server memory to\n-\t\t\t\t\t   perform the requested function. */\n-#define ERRbadmem\t\t9\t/* Invalid memory block address. */\n-#define ERRbadenv\t\t10\t/* Invalid environment. */\n-#define ERRbadformat\t\t11\t/* Invalid format. */\n-#define ERRbadaccess\t\t12\t/* Invalid open mode. */\n-#define ERRbaddata\t\t13\t/* Invalid data (generated only by\n-\t\t\t\t\t   IOCTL calls within the server). */\n-#define ERRbaddrive\t\t15\t/* Invalid drive specified. */\n-#define ERRremcd\t\t16\t/* A Delete Directory request attempted\n-\t\t\t\t\t   to remove the server's current\n-\t\t\t\t\t   directory. */\n-#define ERRdiffdevice\t\t17\t/* Not same device (e.g., a cross\n-\t\t\t\t\t   volume rename was attempted */\n-#define ERRnofiles\t\t18\t/* A File Search command can find no\n-\t\t\t\t\t   more files matching the specified\n-\t\t\t\t\t   criteria. */\n-#define ERRwriteprot\t\t19\t/* media is write protected */\n+/*\n+ * Invalid function. The server did not\n+ * recognize or could not perform a\n+ * system call generated by the server,\n+ * e.g., set the DIRECTORY attribute on\n+ * a data file, invalid seek mode.\n+ */\n+#define ERRbadfunc\t\t1\t// -EINVAL\n+/*\n+ * File not found. The last component\n+ * of a file's pathname could not be\n+ * found.\n+ */\n+#define ERRbadfile\t\t2\t// -ENOENT\n+/*\n+ * Directory invalid. A directory\n+ * component in a pathname could not be\n+ * found.\n+ */\n+#define ERRbadpath\t\t3\t// -ENOTDIR\n+/*\n+ * Too many open files. The server has\n+ * no file handles available.\n+ */\n+#define ERRnofids\t\t4\t// -EMFILE\n+/*\n+ * Access denied, the client's context\n+ * does not permit the requested\n+ * function. This includes the\n+ * following conditions: invalid rename\n+ * command, write to Fid open for read\n+ * only, read on Fid open for write\n+ * only, attempt to delete a non-empty\n+ * directory\n+ */\n+#define ERRnoaccess\t\t5\t// -EACCES\n+/*\n+ * Invalid file handle. The file handle\n+ * specified was not recognized by the\n+ * server.\n+ */\n+#define ERRbadfid\t\t6\t// -EBADF\n+/* Memory control blocks destroyed. */\n+#define ERRbadmcb\t\t7\t// -EIO\n+/*\n+ * Insufficient server memory to\n+ * perform the requested function.\n+ */\n+#define ERRnomem\t\t8\t// -EREMOTEIO\n+/* Invalid memory block address. */\n+#define ERRbadmem\t\t9\t// -EFAULT\n+/* Invalid environment. */\n+#define ERRbadenv\t\t10\t// -EFAULT\n+/* Invalid format. */\n+#define ERRbadformat\t\t11\t// -EINVAL\n+/* Invalid open mode. */\n+#define ERRbadaccess\t\t12\t// -EACCES\n+/*\n+ * Invalid data (generated only by\n+ * IOCTL calls within the server).\n+ */\n+#define ERRbaddata\t\t13\t// -EIO\n+/* Invalid drive specified. */\n+#define ERRbaddrive\t\t15\t// -ENXIO\n+/*\n+ * A Delete Directory request attempted\n+ * to remove the server's current\n+ * directory.\n+ */\n+#define ERRremcd\t\t16\t// -EACCES\n+/*\n+ * Not same device (e.g., a cross\n+ * volume rename was attempted\n+ */\n+#define ERRdiffdevice\t\t17\t// -EXDEV\n+/*\n+ * A File Search command can find no\n+ * more files matching the specified\n+ * criteria.\n+ */\n+#define ERRnofiles\t\t18\t// -ENOENT\n+/* media is write protected */\n+#define ERRwriteprot\t\t19\t// -EROFS\n #define ERRgeneral\t\t31\n-#define ERRbadshare\t\t32\t/* The sharing mode specified for an\n-\t\t\t\t\t   Open conflicts with existing FIDs on\n-\t\t\t\t\t   the file. */\n-#define ERRlock\t\t\t33\t/* A Lock request conflicted with an\n-\t\t\t\t\t   existing lock or specified an\n-\t\t\t\t\t   invalid mode, or an Unlock requested\n-\t\t\t\t\t   attempted to remove a lock held by\n-\t\t\t\t\t   another process. */\n-#define ERRunsup\t\t50\n-#define ERRnosuchshare\t\t67\n-#define ERRfilexists\t\t80\t/* The file named in the request\n-\t\t\t\t\t   already exists. */\n-#define ERRinvparm\t\t87\n-#define ERRdiskfull\t\t112\n-#define ERRinvname\t\t123\n-#define ERRunknownlevel\t\t124\n-#define ERRdirnotempty\t\t145\n-#define ERRnotlocked\t\t158\n-#define ERRcancelviolation\t173\n-#define ERRalreadyexists\t183\n+/*\n+ * The sharing mode specified for an\n+ * Open conflicts with existing FIDs on\n+ * the file.\n+ */\n+#define ERRbadshare\t\t32\t// -EBUSY\n+/*\n+ * A Lock request conflicted with an\n+ * existing lock or specified an\n+ * invalid mode, or an Unlock requested\n+ * attempted to remove a lock held by\n+ * another process.\n+ */\n+#define ERRlock\t\t\t33\t// -EACCES\n+#define ERRunsup\t\t50\t// -EINVAL\n+#define ERRnosuchshare\t\t67\t// -ENXIO\n+/*\n+ * The file named in the request\n+ * already exists.\n+ */\n+#define ERRfilexists\t\t80\t// -EEXIST\n+#define ERRinvparm\t\t87\t// -EINVAL\n+#define ERRdiskfull\t\t112\t// -ENOSPC\n+#define ERRinvname\t\t123\t// -ENOENT\n+#define ERRunknownlevel\t\t124\t// -EOPNOTSUPP\n+#define ERRdirnotempty\t\t145\t// -ENOTEMPTY\n+#define ERRnotlocked\t\t158\t// -ENOLCK\n+#define ERRcancelviolation\t173\t// -ENOLCK\n+#define ERRalreadyexists\t183\t// -EEXIST\n #define ERRbadpipe\t\t230\n #define ERRpipebusy\t\t231\n #define ERRpipeclosing\t\t232\n #define ERRnotconnected\t\t233\n-#define ERRmoredata\t\t234\n-#define ERReasnotsupported\t282\n-#define ErrQuota\t\t0x200\t/* The operation would cause a quota\n-\t\t\t\t\t   limit to be exceeded. */\n-#define ErrNotALink\t\t0x201\t/* A link operation was performed on a\n-\t\t\t\t\t   pathname that was not a link. */\n+#define ERRmoredata\t\t234\t// -EOVERFLOW\n+#define ERReasnotsupported\t282\t// -EOPNOTSUPP\n+/*\n+ * The operation would cause a quota\n+ * limit to be exceeded.\n+ */\n+#define ErrQuota\t\t0x200\t// -EDQUOT\n+/*\n+ * A link operation was performed on a\n+ * pathname that was not a link.\n+ */\n+#define ErrNotALink\t\t0x201\t// -ENOLINK\n \n /* Below errors are used internally (do not come over the wire) for passthrough\n    from STATUS codes to POSIX only  */\n-#define ERRsymlink              0xFFFD\n-#define ErrTooManyLinks         0xFFFE\n+#define ERRsymlink              0xFFFD\t// -EOPNOTSUPP\n+#define ErrTooManyLinks         0xFFFE\t// -EMLINK\n \n /* Following error codes may be generated with the ERRSRV error class.*/\n \n-#define ERRerror\t\t1\t/* Non-specific error code. It is\n-\t\t\t\t\t   returned under the following\n-\t\t\t\t\t   conditions: resource other than disk\n-\t\t\t\t\t   space exhausted (e.g. TIDs), first\n-\t\t\t\t\t   SMB command was not negotiate,\n-\t\t\t\t\t   multiple negotiates attempted, and\n-\t\t\t\t\t   internal server error. */\n-#define ERRbadpw\t\t2\t/* Bad password - name/password pair in\n-\t\t\t\t\t   a TreeConnect or Session Setup are\n-\t\t\t\t\t   invalid. */\n-#define ERRbadtype\t\t3\t/* used for indicating DFS referral\n-\t\t\t\t\t   needed */\n-#define ERRaccess\t\t4\t/* The client does not have the\n-\t\t\t\t\t   necessary access rights within the\n-\t\t\t\t\t   specified context for requested\n-\t\t\t\t\t   function. */\n-#define ERRinvtid\t\t5\t/* The Tid specified in a command was\n-\t\t\t\t\t   invalid. */\n-#define ERRinvnetname\t\t6\t/* Invalid network name in tree\n-\t\t\t\t\t   connect. */\n-#define ERRinvdevice\t\t7\t/* Invalid device - printer request\n-\t\t\t\t\t   made to non-printer connection or\n-\t\t\t\t\t   non-printer request made to printer\n-\t\t\t\t\t   connection. */\n-#define ERRqfull\t\t49\t/* Print queue full (files) -- returned\n-\t\t\t\t\t   by open print file. */\n-#define ERRqtoobig\t\t50\t/* Print queue full -- no space. */\n-#define ERRqeof\t\t\t51\t/* EOF on print queue dump */\n-#define ERRinvpfid\t\t52\t/* Invalid print file FID. */\n-#define ERRsmbcmd\t\t64\t/* The server did not recognize the\n-\t\t\t\t\t   command received. */\n-#define ERRsrverror\t\t65\t/* The server encountered an internal\n-\t\t\t\t\t   error, e.g., system file\n-\t\t\t\t\t   unavailable. */\n-#define ERRbadBID\t\t66\t/* (obsolete) */\n-#define ERRfilespecs\t\t67\t/* The Fid and pathname parameters\n-\t\t\t\t\t   contained an invalid combination of\n-\t\t\t\t\t   values. */\n-#define ERRbadLink\t\t68\t/* (obsolete) */\n-#define ERRbadpermits\t\t69\t/* The access permissions specified for\n-\t\t\t\t\t   a file or directory are not a valid\n-\t\t\t\t\t   combination. */\n-#define ERRbadPID\t\t70\n-#define ERRsetattrmode\t\t71\t/* attribute (mode) is invalid */\n-#define ERRpaused\t\t81\t/* Server is paused */\n-#define ERRmsgoff\t\t82\t/* reserved - messaging off */\n-#define ERRnoroom\t\t83\t/* reserved - no room for message */\n-#define ERRrmuns\t\t87\t/* reserved - too many remote names */\n-#define ERRtimeout\t\t88\t/* operation timed out */\n-#define ERRnoresource\t\t89\t/* No resources available for request\n-\t\t\t\t\t   */\n-#define ERRtoomanyuids\t\t90\t/* Too many UIDs active on this session\n-\t\t\t\t\t   */\n-#define ERRbaduid\t\t91\t/* The UID is not known as a valid user\n-\t\t\t\t\t   */\n-#define ERRusempx\t\t250\t/* temporarily unable to use raw */\n-#define ERRusestd\t\t251\t/* temporarily unable to use either raw\n-\t\t\t\t\t   or mpx */\n-#define ERR_NOTIFY_ENUM_DIR\t1024\n-#define ERRnoSuchUser\t\t2238\t/* user account does not exist */\n-#define ERRaccountexpired\t2239\n-#define ERRbadclient\t\t2240\t/* can not logon from this client */\n-#define ERRbadLogonTime\t\t2241\t/* logon hours do not allow this */\n-#define ERRpasswordExpired\t2242\n-#define ERRnetlogonNotStarted\t2455\n-#define ERRnosupport\t\t0xFFFF\n+/*\n+ * Non-specific error code. It is\n+ * returned under the following\n+ * conditions: resource other than disk\n+ * space exhausted (e.g. TIDs), first\n+ * SMB command was not negotiate,\n+ * multiple negotiates attempted, and\n+ * internal server error.\n+ */\n+#define ERRerror\t\t1\t// -EIO\n+/*\n+ * Bad password - name/password pair in\n+ * a TreeConnect or Session Setup are\n+ * invalid.\n+ */\n+#define ERRbadpw\t\t2\t// -EACCES\n+/*\n+ * used for indicating DFS referral\n+ * needed\n+ */\n+#define ERRbadtype\t\t3\t// -EREMOTE\n+/*\n+ * The client does not have the\n+ * necessary access rights within the\n+ * specified context for requested\n+ * function.\n+ */\n+#define ERRaccess\t\t4\t// -EACCES\n+/*\n+ * The Tid specified in a command was\n+ * invalid.\n+ */\n+#define ERRinvtid\t\t5\t// -ENXIO\n+/*\n+ * Invalid network name in tree\n+ * connect.\n+ */\n+#define ERRinvnetname\t\t6\t// -ENXIO\n+/*\n+ * Invalid device - printer request\n+ * made to non-printer connection or\n+ * non-printer request made to printer\n+ * connection.\n+ */\n+#define ERRinvdevice\t\t7\t// -ENXIO\n+/*\n+ * Print queue full (files) -- returned\n+ * by open print file.\n+ */\n+#define ERRqfull\t\t49\t// -ENOSPC\n+/* Print queue full -- no space. */\n+#define ERRqtoobig\t\t50\t// -ENOSPC\n+/* EOF on print queue dump */\n+#define ERRqeof\t\t\t51\t// -EIO\n+/* Invalid print file FID. */\n+#define ERRinvpfid\t\t52\t// -EBADF\n+/*\n+ * The server did not recognize the\n+ * command received.\n+ */\n+#define ERRsmbcmd\t\t64\t// -EBADRQC\n+/*\n+ * The server encountered an internal\n+ * error, e.g., system file\n+ * unavailable.\n+ */\n+#define ERRsrverror\t\t65\t// -EIO\n+/* (obsolete) */\n+#define ERRbadBID\t\t66\t// -EIO\n+/*\n+ * The Fid and pathname parameters\n+ * contained an invalid combination of\n+ * values.\n+ */\n+#define ERRfilespecs\t\t67\t// -EINVAL\n+/* (obsolete) */\n+#define ERRbadLink\t\t68\t// -EIO\n+/*\n+ * The access permissions specified for\n+ * a file or directory are not a valid\n+ * combination.\n+ */\n+#define ERRbadpermits\t\t69\t// -EINVAL\n+#define ERRbadPID\t\t70\t// -ESRCH\n+/* attribute (mode) is invalid */\n+#define ERRsetattrmode\t\t71\t// -EINVAL\n+/* Server is paused */\n+#define ERRpaused\t\t81\t// -EHOSTDOWN\n+/* reserved - messaging off */\n+#define ERRmsgoff\t\t82\t// -EHOSTDOWN\n+/* reserved - no room for message */\n+#define ERRnoroom\t\t83\t// -ENOSPC\n+/* reserved - too many remote names */\n+#define ERRrmuns\t\t87\t// -EUSERS\n+/* operation timed out */\n+#define ERRtimeout\t\t88\t// -ETIME\n+/* No resources available for request */\n+#define ERRnoresource\t\t89\t// -EREMOTEIO\n+/* Too many UIDs active on this session */\n+#define ERRtoomanyuids\t\t90\t// -EUSERS\n+/* The UID is not known as a valid user */\n+#define ERRbaduid\t\t91\t// -EACCES\n+/* temporarily unable to use raw */\n+#define ERRusempx\t\t250\t// -EIO\n+/*\n+ * temporarily unable to use either raw\n+ * or mpx\n+ */\n+#define ERRusestd\t\t251\t// -EIO\n+#define ERR_NOTIFY_ENUM_DIR\t1024\t// -ENOBUFS\n+/* user account does not exist */\n+#define ERRnoSuchUser\t\t2238\t// -EACCES\n+#define ERRaccountexpired\t2239\t// -EKEYEXPIRED\n+/* can not logon from this client */\n+#define ERRbadclient\t\t2240\t// -EACCES\n+/* logon hours do not allow this */\n+#define ERRbadLogonTime\t\t2241\t// -EACCES\n+#define ERRpasswordExpired\t2242\t// -EKEYEXPIRED\n+#define ERRnetlogonNotStarted\t2455\t// -ENOPROTOOPT\n+#define ERRnosupport\t\t0xFFFF\t// -EINVAL\n",
    "prefixes": [
        "v2",
        "08/12"
    ]
}