From 9c0001fb641d612be430559bc24c2589692ada87 Mon Sep 17 00:00:00 2001 From: flying Date: Wed, 10 Apr 2024 07:15:38 +0000 Subject: [PATCH] update tools/syscap_config_merge.py. Signed-off-by: flying --- tools/syscap_config_merge.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/syscap_config_merge.py b/tools/syscap_config_merge.py index c3d676e..9ab45de 100755 --- a/tools/syscap_config_merge.py +++ b/tools/syscap_config_merge.py @@ -18,6 +18,7 @@ 1. 扩展syscap头文件的枚举定义,须在开始位置标记最小值,且必须大于等于500。 ''' import argparse +import os LICENCE = '''/* * Copyright (c) 2023 Huawei Device Co., Ltd. @@ -151,6 +152,6 @@ if __name__ == '__main__': output_file = args.output full = assemble_header_file(base_file, extern_file) - with open(output_file, 'w') as out: + with os.fdopen(os.open(output_file, os.O_WRONLY | os.O_CREAT, mode=0o640), 'w') as out: out.writelines(full) -- Gitee