]>
Commit | Line | Data |
---|---|---|
c8f4eac4 | 1 | /* |
4e0938ef | 2 | * Copyright (C) 1996-2014 The Squid Software Foundation and contributors |
c8f4eac4 | 3 | * |
4e0938ef AJ |
4 | * Squid software is distributed under GPLv2+ license and includes |
5 | * contributions from numerous individuals and organizations. | |
6 | * Please see the COPYING and CONTRIBUTORS files for details. | |
c8f4eac4 | 7 | */ |
8 | ||
4e0938ef AJ |
9 | /* DEBUG: section 84 Helper process maintenance */ |
10 | ||
582c2af2 FC |
11 | #include "squid.h" |
12 | #include "MemBuf.h" | |
211e9ce2 | 13 | #include "store_rebuild.h" |
9d4e9cfb | 14 | #include "SwapDir.h" |
074d6a40 AJ |
15 | |
16 | #include <cstring> | |
c8f4eac4 | 17 | |
d3546528 FC |
18 | #define STUB_API "stub_store_rebuild.cc" |
19 | #include "tests/STUB.h" | |
c8f4eac4 | 20 | |
d3546528 | 21 | void storeRebuildProgress(int sd_index, int total, int sofar) STUB |
211e9ce2 FC |
22 | bool storeRebuildKeepEntry(const StoreEntry &tmpe, const cache_key *key, StoreRebuildData &counts) STUB_RETVAL(false) |
23 | bool storeRebuildParseEntry(MemBuf &, StoreEntry &, cache_key *, StoreRebuildData &, uint64_t) STUB_RETVAL(false) | |
02c267b0 AR |
24 | |
25 | void storeRebuildComplete(StoreRebuildData *) | |
26 | { | |
27 | --StoreController::store_dirs_rebuilding; | |
28 | } | |
29 | ||
30 | bool | |
31 | storeRebuildLoadEntry(int fd, int diskIndex, MemBuf &buf, StoreRebuildData &) | |
32 | { | |
33 | if (fd < 0) | |
34 | return false; | |
35 | ||
36 | assert(buf.hasSpace()); // caller must allocate | |
37 | // this stub simulates reading an empty entry | |
38 | memset(buf.space(), 0, buf.spaceSize()); | |
39 | buf.appended(buf.spaceSize()); | |
40 | return true; | |
41 | } | |
f53969cc | 42 |