X-Git-Url: http://git.onelab.eu/?p=util-vserver.git;a=blobdiff_plain;f=src%2Fvhashify.c;h=2950f97d7434aacda50dffa069f7d26195e172d7;hp=34e32a9012c1719f156d6592eba64b085d4f604a;hb=2822ba293eb308225c50d346930c47bf98d9927b;hpb=2894fc5a4c8335e4d7221311fed0556f33f8047c diff --git a/src/vhashify.c b/src/vhashify.c index 34e32a9..2950f97 100644 --- a/src/vhashify.c +++ b/src/vhashify.c @@ -1,4 +1,4 @@ -// $Id: vhashify.c 2403 2006-11-24 23:06:08Z dhozac $ --*- c -*-- +// $Id: vhashify.c,v 1.6 2005/03/24 12:46:59 ensc Exp $ --*- c -*-- // Copyright (C) 2005 Enrico Scholz // @@ -269,7 +269,6 @@ convertDigest(HashPath d_path) return true; } -#ifndef ENSC_TESTSUITE static bool addStatHash(hashFunctionContext *h_ctx, struct stat const * const st) { @@ -292,20 +291,9 @@ addStatHash(hashFunctionContext *h_ctx, struct stat const * const st) SET_ATTR(mtime) }; -#undef SET_ATTR -#undef DECL_ATTR - - return hashFunctionContextUpdate(h_ctx, (void *)&tmp, sizeof tmp)!=-1; } -#else -static bool -addStatHash(hashFunctionContext UNUSED *h_ctx, struct stat const UNUSED * const st) -{ - return true; -} -#endif - + static bool calculateHashFromFD(int fd, HashPath d_path, struct stat const * const st) { @@ -711,7 +699,7 @@ int main(int argc, char *argv[]) default : WRITE_MSG(2, "Try '"); WRITE_STR(2, argv[0]); - WRITE_MSG(2, " --help' for more information.\n"); + WRITE_MSG(2, " --help\" for more information.\n"); return EXIT_FAILURE; break; } @@ -752,6 +740,4 @@ int main(int argc, char *argv[]) freeHashList(&global_info.hash_dirs); hashFunctionContextFree(&global_info.hash_context); #endif - - return EXIT_SUCCESS; }