X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;ds=sidebyside;f=src%2Fvhashify.h;fp=src%2Fvhashify.h;h=c32f533ca0e959a627b2083fc6dea245d7281727;hb=8cf13bb177d92c93eb73dc8939777150536c2d00;hp=0000000000000000000000000000000000000000;hpb=6bf3f95de36c804c97716b2d0bdf10680c559044;p=util-vserver.git diff --git a/src/vhashify.h b/src/vhashify.h new file mode 100644 index 0000000..c32f533 --- /dev/null +++ b/src/vhashify.h @@ -0,0 +1,53 @@ +// $Id: vhashify.h,v 1.2 2005/03/18 00:25:37 ensc Exp $ --*- c -*-- + +// Copyright (C) 2004 Enrico Scholz +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; version 2 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + +#ifndef H_UTIL_VSERVER_SRC_VHASHIFY_H +#define H_UTIL_VSERVER_SRC_VHASHIFY_H + +#include "ensc_vector/list.h" +#include "lib_internal/pathinfo.h" + +#include +#include + +struct Arguments { + enum {mdMANUALLY, mdVSERVER} mode; + unsigned int verbosity; + unsigned int insecure; + char const * hash_dir; + bool dry_run; + bool do_refresh; +}; + +struct HashDirInfo { + PathInfo const path; + dev_t device; +}; + +struct SkipReason { + enum { rsDOTFILE, rsEXCL, rsTOOSMALL, rsUNSUPPORTED, + rsFSTAT, rsSYMLINK, rsUNIFIED, rsWRONGDEV, + rsSPECIAL, rsGENERAL } r; +}; + +typedef struct Vector HashDirCollection; + +int HashDirInfo_compareDevice(void const *lhs, void const *rhs); +PathInfo const * HashDirInfo_findDevice(HashDirCollection const *, dev_t dev); + +#endif // H_UTIL_VSERVER_SRC_VHASHIFY_H