diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2016-04-12 11:20:31 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2016-04-15 12:21:45 +0200 |
commit | e1385b3399b606c2fe495f2e1967822af715edec (patch) | |
tree | 52bd1e9991c93830f67fb605347e95ed05ae6bd0 | |
parent | 69858c74b2de4c03c969712fc016a8ce8ac09a0a (diff) | |
download | barebox-e1385b3399b606c2fe495f2e1967822af715edec.tar.gz barebox-e1385b3399b606c2fe495f2e1967822af715edec.tar.xz |
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.c | 1 | ||||
-rw-r--r-- | commands/rm.c | 1 | ||||
-rw-r--r-- | include/fs.h | 2 | ||||
-rw-r--r-- | include/libfile.h | 2 | ||||
-rw-r--r-- | lib/unlink-recursive.c | 1 |
5 files changed, 5 insertions, 2 deletions
diff --git a/commands/loadenv.c b/commands/loadenv.c index 8d6be2fa83..44e96c3b60 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 5f1f582f5e..4eebb3d159 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 21490db7b9..7081227780 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 3f81718bbd..de4f42dbd1 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 78dc01593d..434fdc791b 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> |