diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2007-09-24 17:00:49 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2007-09-24 17:00:49 +0200 |
commit | ca5ae599d690f3870b10797f57a7ca046b0b9e44 (patch) | |
tree | a6ad2da0782e95526c89a05ba04428a9134a00fc /include/libbb.h | |
parent | ddfa0c174eae92db9576499c4f4eed66765373c8 (diff) | |
download | barebox-ca5ae599d690f3870b10797f57a7ca046b0b9e44.tar.gz barebox-ca5ae599d690f3870b10797f57a7ca046b0b9e44.tar.xz |
add recursive_action() and concat_subpath_file() from busybox
Diffstat (limited to 'include/libbb.h')
-rw-r--r-- | include/libbb.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/include/libbb.h b/include/libbb.h index 9455564d82..9a1fdde5b6 100644 --- a/include/libbb.h +++ b/include/libbb.h @@ -1,9 +1,27 @@ #ifndef __LIBBB_H #define __LIBBB_H + +#include <linux/stat.h> + +#define DOT_OR_DOTDOT(s) ((s)[0] == '.' && (!(s)[1] || ((s)[1] == '.' && !(s)[2]))) + char *concat_path_file(const char *path, const char *filename); +char *concat_subpath_file(const char *path, const char *f); int execable_file(const char *name); char *find_execable(const char *filename); char* last_char_is(const char *s, int c); +enum { + ACTION_RECURSE = (1 << 0), + /* ACTION_FOLLOWLINKS = (1 << 1), - unused */ + ACTION_DEPTHFIRST = (1 << 2), + /*ACTION_REVERSE = (1 << 3), - unused */ +}; + +int recursive_action(const char *fileName, unsigned flags, + int (*fileAction) (const char *fileName, struct stat* statbuf, void* userData, int depth), + int (*dirAction) (const char *fileName, struct stat* statbuf, void* userData, int depth), + void* userData, const unsigned depth); + #endif /* __LIBBB_H */ |