From 39197864a173bbf6b730d5488bad70da61b9f6ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Rohl=C3=ADnek?= Date: Fri, 1 Nov 2024 13:16:57 +0100 Subject: [PATCH] feat(storage/vfs): make part of nullfs API private --- components/esp_vfs_console/vfs_console.c | 1 + components/vfs/include/esp_private/nullfs.h | 24 +++++++++++++++++++++ components/vfs/include/esp_vfs_null.h | 7 ------ 3 files changed, 25 insertions(+), 7 deletions(-) create mode 100644 components/vfs/include/esp_private/nullfs.h diff --git a/components/esp_vfs_console/vfs_console.c b/components/esp_vfs_console/vfs_console.c index f6a2d26096..df49d518ce 100644 --- a/components/esp_vfs_console/vfs_console.c +++ b/components/esp_vfs_console/vfs_console.c @@ -16,6 +16,7 @@ #include "sdkconfig.h" #include "esp_private/startup_internal.h" #include "esp_vfs_null.h" +#include "esp_private/nullfs.h" #define STRINGIFY(s) STRINGIFY2(s) #define STRINGIFY2(s) #s diff --git a/components/vfs/include/esp_private/nullfs.h b/components/vfs/include/esp_private/nullfs.h new file mode 100644 index 0000000000..6baec03b0e --- /dev/null +++ b/components/vfs/include/esp_private/nullfs.h @@ -0,0 +1,24 @@ +/* + * SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ +#pragma once + +#include "esp_vfs.h" +#include "esp_err.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @brief Get VFS structure for /dev/null + * + * @return VFS structure for /dev/null + */ +const esp_vfs_t *esp_vfs_null_get_vfs(void); + +#ifdef __cplusplus +} +#endif diff --git a/components/vfs/include/esp_vfs_null.h b/components/vfs/include/esp_vfs_null.h index f3983894d0..9602c6b663 100644 --- a/components/vfs/include/esp_vfs_null.h +++ b/components/vfs/include/esp_vfs_null.h @@ -12,13 +12,6 @@ extern "C" { #endif -/** - * @brief Get VFS structure for /dev/null - * - * @return VFS structure for /dev/null - */ -const esp_vfs_t *esp_vfs_null_get_vfs(void); - /** * @brief Register filesystem for /dev/null *