[PATCH 09/14] move unlink_recursive declaration to libfile.h

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



unlink_recursive is a file utility function, so move the prototype to
libfile.h

Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>
---
 commands/loadenv.c     | 1 +
 commands/rm.c          | 1 +
 include/fs.h           | 2 --
 include/libfile.h      | 2 ++
 lib/unlink-recursive.c | 1 +
 5 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/commands/loadenv.c b/commands/loadenv.c
index 8d6be2f..44e96c3 100644
--- a/commands/loadenv.c
+++ b/commands/loadenv.c
@@ -26,6 +26,7 @@
 #include <envfs.h>
 #include <errno.h>
 #include <fs.h>
+#include <libfile.h>
 #include <malloc.h>
 #include <globalvar.h>
 
diff --git a/commands/rm.c b/commands/rm.c
index 5f1f582..4eebb3d 100644
--- a/commands/rm.c
+++ b/commands/rm.c
@@ -19,6 +19,7 @@
 #include <common.h>
 #include <command.h>
 #include <fs.h>
+#include <libfile.h>
 #include <getopt.h>
 #include <errno.h>
 
diff --git a/include/fs.h b/include/fs.h
index 21490db..7081227 100644
--- a/include/fs.h
+++ b/include/fs.h
@@ -179,8 +179,6 @@ void automount_remove(const char *_path);
 int automount_add(const char *path, const char *cmd);
 void automount_print(void);
 
-int unlink_recursive(const char *path, char **failedpath);
-
 int fsdev_open_cdev(struct fs_device_d *fsdev);
 const char *cdev_get_mount_path(struct cdev *cdev);
 const char *cdev_mount_default(struct cdev *cdev, const char *fsoptions);
diff --git a/include/libfile.h b/include/libfile.h
index 3f81718..de4f42d 100644
--- a/include/libfile.h
+++ b/include/libfile.h
@@ -24,4 +24,6 @@ int open_and_lseek(const char *filename, int mode, loff_t pos);
 /* Create a directory and its parents */
 int make_directory(const char *pathname);
 
+int unlink_recursive(const char *path, char **failedpath);
+
 #endif /* __LIBFILE_H */
diff --git a/lib/unlink-recursive.c b/lib/unlink-recursive.c
index 78dc015..434fdc7 100644
--- a/lib/unlink-recursive.c
+++ b/lib/unlink-recursive.c
@@ -1,4 +1,5 @@
 #include <common.h>
+#include <libfile.h>
 #include <errno.h>
 #include <libbb.h>
 #include <fs.h>
-- 
2.7.0


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux