13a42736dSMatthew Dillon /* 23a42736dSMatthew Dillon * CPDUP.H 33a42736dSMatthew Dillon * 4*4d858d58SMatthew Dillon * $DragonFly: src/bin/cpdup/cpdup.h,v 1.4 2006/08/13 20:51:40 dillon Exp $ 53a42736dSMatthew Dillon */ 63a42736dSMatthew Dillon 73a42736dSMatthew Dillon #include <sys/param.h> 83a42736dSMatthew Dillon #include <sys/time.h> 93a42736dSMatthew Dillon #include <sys/stat.h> 1058860d7dSMatthew Dillon #include <sys/file.h> 1158860d7dSMatthew Dillon 123a42736dSMatthew Dillon #include <fcntl.h> 133a42736dSMatthew Dillon #include <stdio.h> 143a42736dSMatthew Dillon #include <stdlib.h> 153a42736dSMatthew Dillon #include <stdarg.h> 163a42736dSMatthew Dillon #include <string.h> 173a42736dSMatthew Dillon #include <errno.h> 1858860d7dSMatthew Dillon #include <unistd.h> 193a42736dSMatthew Dillon #include <utime.h> 203a42736dSMatthew Dillon #include <dirent.h> 213a42736dSMatthew Dillon #include <signal.h> 223a42736dSMatthew Dillon #include <pwd.h> 233a42736dSMatthew Dillon #include <assert.h> 24*4d858d58SMatthew Dillon #ifndef NOMD5 253a42736dSMatthew Dillon #include <md5.h> 26*4d858d58SMatthew Dillon #endif 273a42736dSMatthew Dillon 28577109eaSMatthew Dillon void logstd(const char *ctl, ...); 29577109eaSMatthew Dillon void logerr(const char *ctl, ...); 30577109eaSMatthew Dillon char *mprintf(const char *ctl, ...); 31577109eaSMatthew Dillon void fatal(const char *ctl, ...); 32577109eaSMatthew Dillon char *fextract(FILE *fi, int n, int *pc, int skip); 33577109eaSMatthew Dillon 34577109eaSMatthew Dillon int fsmid_check(int64_t fsmid, const char *dpath); 35577109eaSMatthew Dillon void fsmid_flush(void); 36*4d858d58SMatthew Dillon #ifndef NOMD5 37577109eaSMatthew Dillon int md5_check(const char *spath, const char *dpath); 38577109eaSMatthew Dillon void md5_flush(void); 39*4d858d58SMatthew Dillon #endif 40577109eaSMatthew Dillon 41577109eaSMatthew Dillon extern const char *MD5CacheFile; 42577109eaSMatthew Dillon extern const char *FSMIDCacheFile; 43577109eaSMatthew Dillon 44577109eaSMatthew Dillon extern int SummaryOpt; 45577109eaSMatthew Dillon 46577109eaSMatthew Dillon extern int64_t CountSourceBytes; 47577109eaSMatthew Dillon extern int64_t CountSourceItems; 48577109eaSMatthew Dillon extern int64_t CountCopiedItems; 49577109eaSMatthew Dillon extern int64_t CountReadBytes; 50577109eaSMatthew Dillon extern int64_t CountWriteBytes; 51577109eaSMatthew Dillon extern int64_t CountRemovedItems; 523a42736dSMatthew Dillon 53