X-Git-Url: http://git.linux-vserver.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=util-vserver%2Fsrc%2Fvunify.h;h=87568c0f00d2d29296ede4cc20c8336b5030aa83;hb=9c1daa8ad9c98e670bfa76577ae242be16039aa3;hp=3a404df278e537618f3db8c7195da16285a4ca7a;hpb=e3d4565bc764db8eba3be02f85f24d6f2f5ad6e9;p=util-vserver.git diff --git a/util-vserver/src/vunify.h b/util-vserver/src/vunify.h index 3a404df..87568c0 100644 --- a/util-vserver/src/vunify.h +++ b/util-vserver/src/vunify.h @@ -19,35 +19,54 @@ #ifndef H_UTIL_VSERVER_SRC_VUNIFY_H #define H_UTIL_VSERVER_SRC_VUNIFY_H -#include "vunify-matchlist.h" +#include "lib_internal/matchlist.h" struct dirent; struct WalkdownInfo { - PathInfo state; - struct MatchList dst_list; + PathInfo state; + struct MatchList dst_list; struct { - struct MatchList * v; - size_t l; - } src_lists; + struct MatchList * v; + size_t l; + } src_lists; }; -static void visitDirEntry(struct dirent const *) NONNULL((1)); -static void visitDir(char const *, struct stat const *) NONNULL((1)); +struct SkipReason { + enum { rsDOTFILE, rsEXCL_DST, rsEXCL_SRC, + rsFSTAT, rsNOEXISTS, rsSYMLINK, rsUNIFIED, + rsSPECIAL, rsDIFFERENT } r; + + union { + struct MatchList const * list; + } d; +}; + +struct Arguments { + enum {mdMANUALLY, mdVSERVER} mode; + bool do_revert; + bool do_dry_run; + unsigned int verbosity; + bool local_fs; + bool do_renew; +}; + +struct stat; + static bool checkFstat(struct MatchList const * const, PathInfo const * const, PathInfo const * const, - struct stat const ** const, - struct stat * const) NONNULL((1,2,3,4,5)); + struct stat const ** const, struct stat * const, + struct stat *) NONNULL((1,2,3,4,5,6)); static struct MatchList const * checkDirEntry(PathInfo const *, PathInfo const *, - bool *, struct stat *) NONNULL((1,2,3,4)); + bool *, struct stat *, struct stat *) NONNULL((1,2,3,4,5)); static bool updateSkipDepth(PathInfo const *, bool) NONNULL((1)); -static void EsafeChdir(char const *, struct stat const *) NONNULL((1,2)); -static bool doit(struct MatchList const *, PathInfo const *, - char const *dst_path) NONNULL((1,2,3)); +static bool doit(struct MatchList const *, + PathInfo const *, struct stat const *, + char const *dst_path, struct stat const *) NONNULL((1,2,3)); #endif // H_UTIL_VSERVER_SRC_VUNIFY_H