#include "vunify.h"
#include "util.h"
+#include "lib_internal/unify.h"
#include <lib/vserver.h>
#include <getopt.h>
#include <errno.h>
#include <wait.h>
#include <fcntl.h>
+#include <assert.h>
#define ENSC_WRAPPERS_IO 1
#define ENSC_WRAPPERS_FCNTL 1
static struct SkipReason skip_reason;
static struct Arguments const * global_args;
+int Global_getVerbosity() {
+ return global_args->verbosity;
+}
+
+bool Global_doRenew() {
+ return global_args->do_renew;
+}
+
static void
showHelp(int fd, char const *cmd, int res)
{
exit(0);
}
-#include "vunify-compare.hc"
-
// Returns 'false' iff one of the files is not existing, or of the files are different/not unifyable
static bool
checkFstat(struct MatchList const * const mlist,
// both files are different, so return false
skip_reason.r = rsDIFFERENT;
- if ((!global_args->do_revert && !compareUnify (*dst_fstat, src_fstat)) ||
- ( global_args->do_revert && !compareDeUnify(*dst_fstat, src_fstat)))
+ if ((!global_args->do_revert && !Unify_isUnifyable(*dst_fstat, src_fstat)) ||
+ ( global_args->do_revert && !Unify_isUnified (*dst_fstat, src_fstat)))
return false;
}
}
else if (cache_stat!=0 && !global_args->do_revert &&
skip_reason.r == rsDIFFERENT &&
- compareDeUnify(cache_stat, src_stat)) {
+ Unify_isUnified(cache_stat, src_stat)) {
skip_reason.r = rsUNIFIED;
skip_reason.d.list = mlist;
return 0;
FatalErrnoError(safeChdir(path, exp_stat)==-1, "safeChdir()");
}
-#include "vunify-doit.hc"
-
static bool
doit(struct MatchList const *mlist,
PathInfo const *src_path, struct stat const *src_stat,
PathInfo_append(&path, src_path, path_buf);
return (global_args->do_dry_run ||
- (!global_args->do_revert && doitUnify( path.d, src_stat, dst_path, dst_stat)) ||
- ( global_args->do_revert && doitDeUnify(path.d, src_stat, dst_path, dst_stat)));
+ (!global_args->do_revert && Unify_unify( path.d, src_stat, dst_path, dst_stat)) ||
+ ( global_args->do_revert && Unify_deUnify(path.d, src_stat, dst_path, dst_stat)));
}
static void