diff options
author | Lennart Poettering <lennart@poettering.net> | 2003-08-29 01:21:11 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2003-08-29 01:21:11 +0000 |
commit | db3b96fc0014a5e860df1efc729b38d629662826 (patch) | |
tree | 9076f5b7c6a14c6239b562d442cdf46d755c9ff0 /src/util.h | |
parent | 0d7460e9592c501b48fe9ab05d8e7fd52cb5bb4d (diff) |
many fixes
--cleanup implemented
git-svn-id: file:///home/lennart/svn/public/syrep/trunk@13 07ea20a6-d2c5-0310-9e02-9ef735347d72
Diffstat (limited to 'src/util.h')
-rw-r--r-- | src/util.h | 16 |
1 files changed, 11 insertions, 5 deletions
@@ -24,13 +24,19 @@ #include <db.h> #include <stdint.h> +#ifndef MIN +#define MIN(a,b) ((a)<(b)?(a):(b)) +#endif + void statistics(DB *db); char* normalize_path(char *s); void rotdash(void); -const char* get_attached_filename(const char *path, const char *fn); +void rotdash_hide(void); +const char* get_snapshot_filename(const char *path, const char *fn); int isdirectory(const char *path); int copy_fd(int sfd, int dfd, uint32_t l); int copy_file(const char *src, const char *dst, int c); +int move_file(const char *src, const char *dst, int c); int copy_or_link_file(const char *src, const char *dst, int c); /* Remove all directories between path and root if they are empty. */ @@ -42,10 +48,10 @@ int mkdir_p(const char *path, mode_t m); /* Create all leading directories in path */ int makeprefixpath(const char *path, mode_t m); -int move_file(const char *src, const char *dst, int c); +int question(const char *q, const char *resp); + +/* Same as /bin/rm -rf in the shell */ +int rm_rf(const char *root, int rec); -#ifndef MIN -#define MIN(a,b) ((a)<(b)?(a):(b)) -#endif #endif |