]> git.ipfire.org Git - thirdparty/linux.git/commit
smb/client: autogenerate SMB1 NT status to DOS error mapping
authorHuiwen He <hehuiwen@kylinos.cn>
Thu, 2 Apr 2026 14:18:28 +0000 (14:18 +0000)
committerSteve French <stfrench@microsoft.com>
Mon, 6 Apr 2026 00:58:40 +0000 (19:58 -0500)
commit415c5b8c9a41e3fc40e0e110c8fadf26c51df5c5
treeb5de5250ad522fb663b06928654731ac10c45cf9
parent378f75b7d6ea10f6368d414eb6b25f32224e9fc7
smb/client: autogenerate SMB1 NT status to DOS error mapping

Introduce `gen_smb1_mapping` script to autogenerate the NT status to
DOS error mapping table for SMB1. This script parses nterr.h to
generate smb1_mapping_table.c, which is then directly included as
the content of the ntstatus_to_dos_map[] array at compile time.

The generated array is numerically sorted during the build process to
ensure a consistent structure, providing the necessary groundwork for
future introduction of binary search lookups.

Signed-off-by: Huiwen He <hehuiwen@kylinos.cn>
Reviewed-by: ChenXiaoSong <chenxiaosong@kylinos.cn>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/client/.gitignore
fs/smb/client/Makefile
fs/smb/client/gen_smb1_mapping [new file with mode: 0644]
fs/smb/client/nterr.h
fs/smb/client/smb1maperror.c