summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2016-04-12 11:20:31 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2016-04-15 12:21:45 +0200
commite1385b3399b606c2fe495f2e1967822af715edec (patch)
tree52bd1e9991c93830f67fb605347e95ed05ae6bd0
parent69858c74b2de4c03c969712fc016a8ce8ac09a0a (diff)
downloadbarebox-e1385b3399b606c2fe495f2e1967822af715edec.tar.gz
move unlink_recursive declaration to libfile.h
unlink_recursive is a file utility function, so move the prototype to libfile.h Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--commands/loadenv.c1
-rw-r--r--commands/rm.c1
-rw-r--r--include/fs.h2
-rw-r--r--include/libfile.h2
-rw-r--r--lib/unlink-recursive.c1
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>