Add basic support for mini2440 board to barebox.
[barebox-mini2440.git] / include / libbb.h
blob4151230c677506a5fae328054a4f1ad3d3a4c5e5
2 #ifndef __LIBBB_H
3 #define __LIBBB_H
5 #include <linux/stat.h>
7 #define DOT_OR_DOTDOT(s) ((s)[0] == '.' && (!(s)[1] || ((s)[1] == '.' && !(s)[2])))
9 char *concat_path_file(const char *path, const char *filename);
10 char *concat_subpath_file(const char *path, const char *f);
11 int execable_file(const char *name);
12 char *find_execable(const char *filename);
13 char* last_char_is(const char *s, int c);
15 enum {
16 ACTION_RECURSE = (1 << 0),
17 /* ACTION_FOLLOWLINKS = (1 << 1), - unused */
18 ACTION_DEPTHFIRST = (1 << 2),
19 /*ACTION_REVERSE = (1 << 3), - unused */
22 int recursive_action(const char *fileName, unsigned flags,
23 int (*fileAction) (const char *fileName, struct stat* statbuf, void* userData, int depth),
24 int (*dirAction) (const char *fileName, struct stat* statbuf, void* userData, int depth),
25 void* userData, const unsigned depth);
27 char * safe_strncpy(char *dst, const char *src, size_t size);
29 int copy_file(const char *src, const char *dst);
31 int process_escape_sequence(const char *source, char *dest, int destlen);
33 #endif /* __LIBBB_H */