aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2006-03-01 12:51:39 +0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2006-03-01 12:51:39 +0000
commit6b8bb8d74ab500eb6dddecbdf578c9cdf14a748c (patch)
tree811f8c574ffe4c5e5a9bffe033466efbf2aeb51a /src
parent84c4631221bc65643830173b4affe58b0dc58202 (diff)
* Remove dead code.
Diffstat (limited to 'src')
-rw-r--r--src/libstore/db.cc30
1 files changed, 0 insertions, 30 deletions
diff --git a/src/libstore/db.cc b/src/libstore/db.cc
index 86509697a..448b70e6c 100644
--- a/src/libstore/db.cc
+++ b/src/libstore/db.cc
@@ -130,36 +130,6 @@ Database::~Database()
}
-int getAccessorCount(int fd)
-{
- if (lseek(fd, 0, SEEK_SET) == -1)
- throw SysError("seeking accessor count");
- char buf[128];
- int len;
- if ((len = read(fd, buf, sizeof(buf) - 1)) == -1)
- throw SysError("reading accessor count");
- buf[len] = 0;
- int count;
- if (sscanf(buf, "%d", &count) != 1) {
- debug(format("accessor count is invalid: `%1%'") % buf);
- return -1;
- }
- return count;
-}
-
-
-void setAccessorCount(int fd, int n)
-{
- if (lseek(fd, 0, SEEK_SET) == -1)
- throw SysError("seeking accessor count");
- string s = (format("%1%") % n).str();
- const char * s2 = s.c_str();
- if (write(fd, s2, strlen(s2)) != (ssize_t) strlen(s2) ||
- ftruncate(fd, strlen(s2)) != 0)
- throw SysError("writing accessor count");
-}
-
-
void openEnv(DbEnv * & env, const string & path, u_int32_t flags)
{
try {