aboutsummaryrefslogtreecommitdiff
path: root/lib/lib.h
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2007-02-03 14:11:26 -0500
committerRob Landley <rob@landley.net>2007-02-03 14:11:26 -0500
commitd25f7e440998dfaa5619634d5a0ff90ab480b085 (patch)
treededdd62347918193f22ec711229cdb2834ffb0e1 /lib/lib.h
parentfd1c5ba0cbbd31c4713d9283c4fa5c3265ad2296 (diff)
downloadtoybox-d25f7e440998dfaa5619634d5a0ff90ab480b085.tar.gz
Add xstat(), read_dirtree(), and read_dirtree_node().
Diffstat (limited to 'lib/lib.h')
-rw-r--r--lib/lib.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/lib.h b/lib/lib.h
index e2dc13ec..d3c937ca 100644
--- a/lib/lib.h
+++ b/lib/lib.h
@@ -21,6 +21,13 @@ struct arg_list {
char *arg;
};
+struct dirtree {
+ struct dirtree *next;
+ struct dirtree *child;
+ struct stat st;
+ char name[];
+};
+
// args.c
void get_optflags(void);
@@ -52,6 +59,7 @@ size_t xread(int fd, void *buf, size_t len);
void xreadall(int fd, void *buf, size_t len);
void xwrite(int fd, void *buf, size_t len);
char *xgetcwd(void);
+void xstat(char *path, struct stat *st);
char *xabspath(char *path);
struct string_list *find_in_path(char *path, char *filename);
void utoa_to_buf(unsigned n, char *buf, unsigned buflen);
@@ -59,6 +67,8 @@ void itoa_to_buf(int n, char *buf, unsigned buflen);
char *utoa(unsigned n);
char *itoa(int n);
off_t fdlength(int fd);
+struct dirtree *read_dirtree_node(char *path);
+struct dirtree *read_dirtree(char *path);
// getmountlist.c
struct mtab_list {