From a11c30a3e386b0b820b5025267add1be731e06af Mon Sep 17 00:00:00 2001 From: "radek.tandler" Date: Thu, 2 Oct 2025 09:28:56 +0200 Subject: [PATCH] refactor(nvs_flash): Adjusted copyright notices and header file pragma once --- components/nvs_flash/include/nvs.h | 7 ++--- components/nvs_flash/include/nvs_flash.h | 6 +--- components/nvs_flash/include/nvs_handle.hpp | 10 ++++--- .../nvs_flash/private_include/nvs_constants.h | 8 ++---- .../nvs_flash/private_include/nvs_internal.h | 7 ++--- .../nvs_flash/src/compressed_enum_table.hpp | 8 ++---- components/nvs_flash/src/intrusive_list.h | 8 ++---- .../nvs_flash/src/nvs_encrypted_partition.cpp | 2 +- .../nvs_flash/src/nvs_encrypted_partition.hpp | 28 ++++++------------- .../nvs_flash/src/nvs_handle_locked.hpp | 7 ++--- .../nvs_flash/src/nvs_handle_simple.hpp | 7 ++--- .../nvs_flash/src/nvs_item_hash_list.cpp | 19 ++++--------- .../nvs_flash/src/nvs_item_hash_list.hpp | 9 ++---- .../nvs_flash/src/nvs_memory_management.hpp | 3 +- components/nvs_flash/src/nvs_page.hpp | 8 ++---- components/nvs_flash/src/nvs_pagemanager.hpp | 25 ++++------------- components/nvs_flash/src/nvs_partition.cpp | 2 +- components/nvs_flash/src/nvs_partition.hpp | 7 ++--- .../nvs_flash/src/nvs_partition_lookup.cpp | 9 ++++-- .../nvs_flash/src/nvs_partition_lookup.hpp | 16 ++++++----- .../nvs_flash/src/nvs_partition_manager.cpp | 2 +- .../nvs_flash/src/nvs_partition_manager.hpp | 7 ++--- components/nvs_flash/src/nvs_storage.hpp | 7 ++--- components/nvs_flash/src/nvs_test_api.h | 19 ++++--------- components/nvs_flash/src/nvs_types.hpp | 8 ++---- components/nvs_flash/src/partition.hpp | 8 ++---- tools/ci/check_copyright_ignore.txt | 7 ----- 27 files changed, 80 insertions(+), 174 deletions(-) diff --git a/components/nvs_flash/include/nvs.h b/components/nvs_flash/include/nvs.h index 1f4715d64b6..e01f628b0dc 100644 --- a/components/nvs_flash/include/nvs.h +++ b/components/nvs_flash/include/nvs.h @@ -1,10 +1,9 @@ /* - * SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2015-2025 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ -#ifndef ESP_NVS_H -#define ESP_NVS_H +#pragma once #include #include @@ -802,5 +801,3 @@ void nvs_release_iterator(nvs_iterator_t iterator); #ifdef __cplusplus } // extern "C" #endif - -#endif //ESP_NVS_H diff --git a/components/nvs_flash/include/nvs_flash.h b/components/nvs_flash/include/nvs_flash.h index 03eba446c81..b5332fa1076 100644 --- a/components/nvs_flash/include/nvs_flash.h +++ b/components/nvs_flash/include/nvs_flash.h @@ -3,8 +3,7 @@ * * SPDX-License-Identifier: Apache-2.0 */ -#ifndef nvs_flash_h -#define nvs_flash_h +#pragma once #ifdef __cplusplus extern "C" { @@ -325,6 +324,3 @@ esp_err_t nvs_flash_read_security_cfg_v2(nvs_sec_scheme_t *scheme_cfg, nvs_sec_c #ifdef __cplusplus } #endif - - -#endif /* nvs_flash_h */ diff --git a/components/nvs_flash/include/nvs_handle.hpp b/components/nvs_flash/include/nvs_handle.hpp index 32f49ab759b..eb9ff3c8f54 100644 --- a/components/nvs_flash/include/nvs_handle.hpp +++ b/components/nvs_flash/include/nvs_handle.hpp @@ -1,5 +1,9 @@ -#ifndef NVS_HANDLE_HPP_ -#define NVS_HANDLE_HPP_ +/* + * SPDX-FileCopyrightText: 2019-2025 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ +#pragma once #include #include @@ -307,5 +311,3 @@ esp_err_t NVSHandle::get_item(const char *key, T &value) { } } // nvs - -#endif // NVS_HANDLE_HPP_ diff --git a/components/nvs_flash/private_include/nvs_constants.h b/components/nvs_flash/private_include/nvs_constants.h index 08811563938..42933db9ced 100644 --- a/components/nvs_flash/private_include/nvs_constants.h +++ b/components/nvs_flash/private_include/nvs_constants.h @@ -1,12 +1,10 @@ /* - * SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ -#ifndef NVS_CONSTANTS_H -#define NVS_CONSTANTS_H - #include "spi_flash_mmap.h" // for SPI_FLASH_SEC_SIZE +#pragma once // constants for the NVS to be used in the regular as well as bootloader implementations @@ -64,5 +62,3 @@ #define NVS_CONST_PAGE_HEADER_OFFSET 0 #define NVS_CONST_PAGE_ENTRY_TABLE_OFFSET (NVS_CONST_PAGE_HEADER_OFFSET + 32) #define NVS_CONST_PAGE_ENTRY_DATA_OFFSET (NVS_CONST_PAGE_ENTRY_TABLE_OFFSET + 32) - -#endif diff --git a/components/nvs_flash/private_include/nvs_internal.h b/components/nvs_flash/private_include/nvs_internal.h index 1bf2cb8c4b2..91c753c3f56 100644 --- a/components/nvs_flash/private_include/nvs_internal.h +++ b/components/nvs_flash/private_include/nvs_internal.h @@ -1,10 +1,9 @@ /* - * SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ -#ifndef NVS_INTERNAL_H -#define NVS_INTERNAL_H +#pragma once #if CONFIG_NVS_ASSERT_ERROR_CHECK #define NVS_ASSERT_OR_RETURN(condition, retcode) assert(condition); @@ -14,5 +13,3 @@ return retcode; \ } #endif // CONFIG_NVS_ASSERT_ERROR_CHECK - -#endif // NVS_INTERNAL_H diff --git a/components/nvs_flash/src/compressed_enum_table.hpp b/components/nvs_flash/src/compressed_enum_table.hpp index e276250d5f0..ebc57fd7b99 100644 --- a/components/nvs_flash/src/compressed_enum_table.hpp +++ b/components/nvs_flash/src/compressed_enum_table.hpp @@ -1,11 +1,9 @@ /* - * SPDX-FileCopyrightText: 2015-2022 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2015-2025 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ - -#ifndef compressed_enum_table_h -#define compressed_enum_table_h +#pragma once #include #include @@ -71,5 +69,3 @@ protected: static const uint32_t VALUE_MASK = (1 << Nbits) - 1; uint32_t mData[WORD_COUNT]; }; - -#endif /* compressed_enum_table_h */ diff --git a/components/nvs_flash/src/intrusive_list.h b/components/nvs_flash/src/intrusive_list.h index 9a8c6f228ef..691539e417b 100644 --- a/components/nvs_flash/src/intrusive_list.h +++ b/components/nvs_flash/src/intrusive_list.h @@ -1,10 +1,9 @@ /* - * SPDX-FileCopyrightText: 2015-2022 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2015-2025 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ -#ifndef intrusive_list_h -#define intrusive_list_h +#pragma once #include #include @@ -251,6 +250,3 @@ protected: T* mLast = nullptr; size_t mSize = 0; }; - - -#endif /* intrusive_list_h */ diff --git a/components/nvs_flash/src/nvs_encrypted_partition.cpp b/components/nvs_flash/src/nvs_encrypted_partition.cpp index 653fbefa2c4..335c8d42a82 100644 --- a/components/nvs_flash/src/nvs_encrypted_partition.cpp +++ b/components/nvs_flash/src/nvs_encrypted_partition.cpp @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2019-2022 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2019-2025 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ diff --git a/components/nvs_flash/src/nvs_encrypted_partition.hpp b/components/nvs_flash/src/nvs_encrypted_partition.hpp index 76c0607a0ac..00c7bb1bb50 100644 --- a/components/nvs_flash/src/nvs_encrypted_partition.hpp +++ b/components/nvs_flash/src/nvs_encrypted_partition.hpp @@ -1,22 +1,12 @@ -// Copyright 2019 Espressif Systems (Shanghai) PTE LTD -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +/* + * SPDX-FileCopyrightText: 2019-2025 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ +#pragma once -#ifndef NVS_ENCRYPTED_PARTITION_HPP_ -#define NVS_ENCRYPTED_PARTITION_HPP_ - -#include "mbedtls/aes.h" -#include "nvs_flash.h" +#include "mbedtls/aes.h" // For mbedtls_aes_xts_context +#include "nvs_flash.h" // For nvs_sec_cfg_t #include "nvs_partition.hpp" namespace nvs { @@ -39,5 +29,3 @@ protected: }; } // nvs - -#endif // NVS_ENCRYPTED_PARTITION_HPP_ diff --git a/components/nvs_flash/src/nvs_handle_locked.hpp b/components/nvs_flash/src/nvs_handle_locked.hpp index 8a0f87663a4..7a962ebaa37 100644 --- a/components/nvs_flash/src/nvs_handle_locked.hpp +++ b/components/nvs_flash/src/nvs_handle_locked.hpp @@ -1,10 +1,9 @@ /* - * SPDX-FileCopyrightText: 2015-2023 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2015-2025 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ -#ifndef NVS_HANDLE_LOCKED_HPP_ -#define NVS_HANDLE_LOCKED_HPP_ +#pragma once #include "nvs_handle_simple.hpp" @@ -61,5 +60,3 @@ private: }; } // namespace nvs - -#endif // NVS_HANDLE_LOCKED_HPP_ diff --git a/components/nvs_flash/src/nvs_handle_simple.hpp b/components/nvs_flash/src/nvs_handle_simple.hpp index f7ccb31d27d..4d8857214ad 100644 --- a/components/nvs_flash/src/nvs_handle_simple.hpp +++ b/components/nvs_flash/src/nvs_handle_simple.hpp @@ -1,10 +1,9 @@ /* - * SPDX-FileCopyrightText: 2015-2022 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2015-2025 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ -#ifndef NVS_HANDLE_SIMPLE_HPP_ -#define NVS_HANDLE_SIMPLE_HPP_ +#pragma once #include "intrusive_list.h" #include "nvs_storage.hpp" @@ -104,5 +103,3 @@ private: }; } // nvs - -#endif // NVS_HANDLE_SIMPLE_HPP_ diff --git a/components/nvs_flash/src/nvs_item_hash_list.cpp b/components/nvs_flash/src/nvs_item_hash_list.cpp index 21bf8b31531..ab9bcd47cdd 100644 --- a/components/nvs_flash/src/nvs_item_hash_list.cpp +++ b/components/nvs_flash/src/nvs_item_hash_list.cpp @@ -1,17 +1,8 @@ -// Copyright 2015-2016 Espressif Systems (Shanghai) PTE LTD -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at - -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +/* + * SPDX-FileCopyrightText: 2019-2025 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ #include "nvs_item_hash_list.hpp" namespace nvs diff --git a/components/nvs_flash/src/nvs_item_hash_list.hpp b/components/nvs_flash/src/nvs_item_hash_list.hpp index ead5eeb10fa..aadb2c694c4 100644 --- a/components/nvs_flash/src/nvs_item_hash_list.hpp +++ b/components/nvs_flash/src/nvs_item_hash_list.hpp @@ -1,11 +1,9 @@ /* - * SPDX-FileCopyrightText: 2015-2022 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2015-2025 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ - -#ifndef nvs_item_hash_list_h -#define nvs_item_hash_list_h +#pragma once #include "nvs.h" #include "nvs_types.hpp" @@ -62,6 +60,3 @@ protected: }; // class HashList } // namespace nvs - - -#endif /* nvs_item_hash_list_h */ diff --git a/components/nvs_flash/src/nvs_memory_management.hpp b/components/nvs_flash/src/nvs_memory_management.hpp index 54138f8abad..ed92e244198 100644 --- a/components/nvs_flash/src/nvs_memory_management.hpp +++ b/components/nvs_flash/src/nvs_memory_management.hpp @@ -3,14 +3,13 @@ * * SPDX-License-Identifier: Apache-2.0 */ +#pragma once #include #if !ESP_TEE_BUILD #include "esp_heap_caps.h" #endif -#pragma once - /** * @brief Type that is only usable with new (std::nothrow) to avoid exceptions. * diff --git a/components/nvs_flash/src/nvs_page.hpp b/components/nvs_flash/src/nvs_page.hpp index 953682b157f..a3fbd6e1a17 100644 --- a/components/nvs_flash/src/nvs_page.hpp +++ b/components/nvs_flash/src/nvs_page.hpp @@ -1,10 +1,9 @@ /* - * SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2015-2025 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ -#ifndef nvs_page_hpp -#define nvs_page_hpp +#pragma once #include "nvs.h" #include "nvs_types.hpp" @@ -239,6 +238,3 @@ protected: }; // class Page } // namespace nvs - - -#endif /* nvs_page_hpp */ diff --git a/components/nvs_flash/src/nvs_pagemanager.hpp b/components/nvs_flash/src/nvs_pagemanager.hpp index 4a1c19f7eca..8743a281f80 100644 --- a/components/nvs_flash/src/nvs_pagemanager.hpp +++ b/components/nvs_flash/src/nvs_pagemanager.hpp @@ -1,18 +1,9 @@ -// Copyright 2015-2016 Espressif Systems (Shanghai) PTE LTD -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at - -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -#ifndef nvs_pagemanager_hpp -#define nvs_pagemanager_hpp +/* + * SPDX-FileCopyrightText: 2019-2025 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ +#pragma once #include #include @@ -74,8 +65,4 @@ protected: uint32_t mSeqNumber; }; // class PageManager - } // namespace nvs - - -#endif /* nvs_pagemanager_hpp */ diff --git a/components/nvs_flash/src/nvs_partition.cpp b/components/nvs_flash/src/nvs_partition.cpp index ec15d58baad..dd2547d5183 100644 --- a/components/nvs_flash/src/nvs_partition.cpp +++ b/components/nvs_flash/src/nvs_partition.cpp @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2019-2023 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2019-2025 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ diff --git a/components/nvs_flash/src/nvs_partition.hpp b/components/nvs_flash/src/nvs_partition.hpp index e8f64afc54c..77d7c51c9ac 100644 --- a/components/nvs_flash/src/nvs_partition.hpp +++ b/components/nvs_flash/src/nvs_partition.hpp @@ -1,11 +1,10 @@ /* - * SPDX-FileCopyrightText: 2019-2023 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2019-2025 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ +#pragma once -#ifndef ESP_PARTITION_HPP_ -#define ESP_PARTITION_HPP_ #include "esp_partition.h" #include "intrusive_list.h" @@ -109,5 +108,3 @@ protected: }; } // nvs - -#endif // ESP_PARTITION_HPP_ diff --git a/components/nvs_flash/src/nvs_partition_lookup.cpp b/components/nvs_flash/src/nvs_partition_lookup.cpp index 604049133ac..8f2ac6816a4 100644 --- a/components/nvs_flash/src/nvs_partition_lookup.cpp +++ b/components/nvs_flash/src/nvs_partition_lookup.cpp @@ -1,6 +1,11 @@ -#include "esp_partition.h" -#include "nvs_partition_lookup.hpp" +/* + * SPDX-FileCopyrightText: 2019-2025 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ +#include "nvs_partition_lookup.hpp" // For partition_lookup namespace +#include "esp_partition.h" // For esp_partition_t #ifndef LINUX_TARGET #include "nvs_encrypted_partition.hpp" #endif // ! LINUX_TARGET diff --git a/components/nvs_flash/src/nvs_partition_lookup.hpp b/components/nvs_flash/src/nvs_partition_lookup.hpp index 5dcd5d692c9..215288ace43 100644 --- a/components/nvs_flash/src/nvs_partition_lookup.hpp +++ b/components/nvs_flash/src/nvs_partition_lookup.hpp @@ -1,9 +1,13 @@ -#include "esp_err.h" -#include "nvs_partition.hpp" -#include "nvs_flash.h" +/* + * SPDX-FileCopyrightText: 2019-2025 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ +#pragma once -#ifndef NVS_PARTITION_LOOKUP_HPP_ -#define NVS_PARTITION_LOOKUP_HPP_ +#include "esp_err.h" +#include "nvs_partition.hpp" // For nvs::Partition +#include "nvs_flash.h" // For nvs_sec_cfg_t namespace nvs { @@ -16,5 +20,3 @@ esp_err_t lookup_nvs_encrypted_partition(const char* label, nvs_sec_cfg_t* cfg, } // partition_lookup } // nvs - -#endif // NVS_PARTITION_LOOKUP_HPP_ diff --git a/components/nvs_flash/src/nvs_partition_manager.cpp b/components/nvs_flash/src/nvs_partition_manager.cpp index 8a7e0c6ed07..01851be8139 100644 --- a/components/nvs_flash/src/nvs_partition_manager.cpp +++ b/components/nvs_flash/src/nvs_partition_manager.cpp @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2015-2025 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ diff --git a/components/nvs_flash/src/nvs_partition_manager.hpp b/components/nvs_flash/src/nvs_partition_manager.hpp index 4b437d81e2f..a4ce0c0bd19 100644 --- a/components/nvs_flash/src/nvs_partition_manager.hpp +++ b/components/nvs_flash/src/nvs_partition_manager.hpp @@ -1,10 +1,9 @@ /* - * SPDX-FileCopyrightText: 2015-2022 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2015-2025 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ -#ifndef NVS_PARTITION_MANAGER_HPP_ -#define NVS_PARTITION_MANAGER_HPP_ +#pragma once #include "nvs_handle_simple.hpp" #include "nvs_storage.hpp" @@ -49,5 +48,3 @@ protected: }; } // nvs - -#endif // NVS_PARTITION_MANAGER_HPP_ diff --git a/components/nvs_flash/src/nvs_storage.hpp b/components/nvs_flash/src/nvs_storage.hpp index 1c63d1c8f08..790cdfa2bd3 100644 --- a/components/nvs_flash/src/nvs_storage.hpp +++ b/components/nvs_flash/src/nvs_storage.hpp @@ -1,10 +1,9 @@ /* - * SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2015-2025 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ -#ifndef nvs_storage_hpp -#define nvs_storage_hpp +#pragma once #include #include @@ -175,5 +174,3 @@ struct nvs_opaque_iterator_t intrusive_list::iterator page; nvs_entry_info_t entry_info; }; - -#endif /* nvs_storage_hpp */ diff --git a/components/nvs_flash/src/nvs_test_api.h b/components/nvs_flash/src/nvs_test_api.h index 8ba2c4faa81..09a404c8666 100644 --- a/components/nvs_flash/src/nvs_test_api.h +++ b/components/nvs_flash/src/nvs_test_api.h @@ -1,17 +1,8 @@ -// Copyright 2015-2016 Espressif Systems (Shanghai) PTE LTD -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - +/* + * SPDX-FileCopyrightText: 2019-2025 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ #pragma once #ifdef __cplusplus diff --git a/components/nvs_flash/src/nvs_types.hpp b/components/nvs_flash/src/nvs_types.hpp index 33591a9112e..f19227aac31 100644 --- a/components/nvs_flash/src/nvs_types.hpp +++ b/components/nvs_flash/src/nvs_types.hpp @@ -1,10 +1,9 @@ /* - * SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2015-2025 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ -#ifndef nvs_types_h -#define nvs_types_h +#pragma once #include #include @@ -116,6 +115,5 @@ public: bool checkHeaderConsistency(const uint8_t entryIndex) const; }; -} // namespace nvs -#endif /* nvs_types_h */ +} // namespace nvs diff --git a/components/nvs_flash/src/partition.hpp b/components/nvs_flash/src/partition.hpp index e649f84b200..975a3579c14 100644 --- a/components/nvs_flash/src/partition.hpp +++ b/components/nvs_flash/src/partition.hpp @@ -1,11 +1,9 @@ /* - * SPDX-FileCopyrightText: 2019-2023 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2019-2025 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ - -#ifndef PARTITION_HPP_ -#define PARTITION_HPP_ +#pragma once #include "esp_err.h" @@ -52,5 +50,3 @@ public: }; } // nvs - -#endif // PARTITION_HPP_ diff --git a/tools/ci/check_copyright_ignore.txt b/tools/ci/check_copyright_ignore.txt index 2ed364c1ed8..7cdda9b58fd 100644 --- a/tools/ci/check_copyright_ignore.txt +++ b/tools/ci/check_copyright_ignore.txt @@ -479,13 +479,6 @@ components/mbedtls/port/include/sha1_alt.h components/mbedtls/port/include/sha256_alt.h components/mbedtls/port/include/sha512_alt.h components/mbedtls/port/sha/parallel_engine/sha.c -components/nvs_flash/include/nvs_handle.hpp -components/nvs_flash/src/nvs_encrypted_partition.hpp -components/nvs_flash/src/nvs_item_hash_list.cpp -components/nvs_flash/src/nvs_pagemanager.hpp -components/nvs_flash/src/nvs_partition_lookup.cpp -components/nvs_flash/src/nvs_partition_lookup.hpp -components/nvs_flash/src/nvs_test_api.h components/protocomm/include/transports/protocomm_console.h components/protocomm/include/transports/protocomm_httpd.h components/riscv/include/riscv/csr.h