[LTP] [PATCH 1/2] include: Move new API only functions to new API header

Petr Vorel pvorel@suse.cz
Tue Jan 2 23:39:34 CET 2024


create_overlay_dirs() and mount_overlay() were implemented only in new
API (and we are not planning to use them in legacy API), thus remove
them from legacy API header.

Fixes: a88bbb43d ("lib: add helpers to setup overlayfs mountpoint")
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
 include/safe_file_ops_fn.h  | 4 ----
 include/tst_safe_file_ops.h | 6 ++++++
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/include/safe_file_ops_fn.h b/include/safe_file_ops_fn.h
index aa6420d90..223fb0d68 100644
--- a/include/safe_file_ops_fn.h
+++ b/include/safe_file_ops_fn.h
@@ -90,8 +90,4 @@ int safe_touch(const char *file, const int lineno,
 		const char *pathname,
 		mode_t mode, const struct timespec times[2]);
 
-/* helper functions to setup overlayfs mountpoint */
-void create_overlay_dirs(void);
-int mount_overlay(const char *file, const int lineno, int strict);
-
 #endif /* SAFE_FILE_OPS_FN */
diff --git a/include/tst_safe_file_ops.h b/include/tst_safe_file_ops.h
index 62f6600ec..401f6ee25 100644
--- a/include/tst_safe_file_ops.h
+++ b/include/tst_safe_file_ops.h
@@ -56,6 +56,12 @@
 	safe_touch(__FILE__, __LINE__, NULL, \
 			(pathname), (mode), (times))
 
+/* New API only functions */
+
+/* helper functions to setup overlayfs mountpoint */
+void create_overlay_dirs(void);
+int mount_overlay(const char *file, const int lineno, int strict);
+
 #define SAFE_MOUNT_OVERLAY() \
 	((void) mount_overlay(__FILE__, __LINE__, 1))
 
-- 
2.43.0



More information about the ltp mailing list