From: Alex Rousskov Date: Sun, 8 Mar 2009 21:37:32 +0000 (-0600) Subject: Removed some 140 SOURCEs of ufsdump, adding a few stubs. The program seems to X-Git-Tag: SQUID_3_2_0_1~1111^2~15 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=74544ee3ea97c41a4ed832bd4efe45f954d3fbcf;p=thirdparty%2Fsquid.git Removed some 140 SOURCEs of ufsdump, adding a few stubs. The program seems to work on simple ufs cache files. urlCanonical is currently an always-asserting stub. I am not sure what pulls in urlCanonical. I know storeKeyPublicByRequest* require it, but I am not sure which source requires storeKeyPublicByRequest. If the stub assertion fails on some cache files, we will need to pull more sources or re-implement urlCanonical. The more sources are moved into libraries, the more difficult it may be to write isolated, compact test cases or tools because test case stubs and customizations may start to conflict with names defined in the libraries and because pulling in a whole library might require defining more stubs. It is not clear yet how real this concern is in general, but a lot of acl/ SourceLayout time was spent on making ufsdump build... Context: SourceLayout: acl/, take 1 --- diff --git a/src/ufsdump.cc b/src/ufsdump.cc index dd097dfe33..b945cf33d6 100644 --- a/src/ufsdump.cc +++ b/src/ufsdump.cc @@ -45,19 +45,37 @@ #include /* stub functions for parts of squid not factored to be dynamic yet */ -void shut_down(int) +void +eventAdd(const char *name, EVH * func, void *arg, double when, int, bool cbdata) {} +// required by storeKeyPublicByRequest* +// XXX: what pulls in storeKeyPublicByRequest? +const char *urlCanonical(HttpRequest *) { assert(false); return NULL; } + void -reconfigure(int) -{} +storeAppendPrintf(StoreEntry * e, const char *fmt,...) +{ + va_list args; + va_start(args, fmt); + + assert(false); + + va_end(args); +} + +#include "CacheManager.h" +CacheManager* +CacheManager::GetInstance() +{ + assert(false); + return NULL; +} -#if WHENITMINIMAL void -eventAdd(const char *name, EVH * func, void *arg, double when, int, bool cbdata) -{} +CacheManager::registerAction(char const * action, char const * desc, OBJH * handler, int pw_req_flag, int atomic) {} + -#endif /* end stub functions */ struct MetaStd {