diff options
Diffstat (limited to 'src/os/os_truncate.c')
-rw-r--r-- | src/os/os_truncate.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/os/os_truncate.c b/src/os/os_truncate.c index f559e9cb..473db9cc 100644 --- a/src/os/os_truncate.c +++ b/src/os/os_truncate.c @@ -1,7 +1,7 @@ /*- * See the file LICENSE for redistribution information. * - * Copyright (c) 2004, 2012 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 2015 Oracle and/or its affiliates. All rights reserved. * * $Id$ */ @@ -14,14 +14,16 @@ * __os_truncate -- * Truncate the file. * - * PUBLIC: int __os_truncate __P((ENV *, DB_FH *, db_pgno_t, u_int32_t)); + * PUBLIC: int __os_truncate + * PUBLIC: __P((ENV *, DB_FH *, db_pgno_t, u_int32_t, off_t)); */ int -__os_truncate(env, fhp, pgno, pgsize) +__os_truncate(env, fhp, pgno, pgsize, relative) ENV *env; DB_FH *fhp; db_pgno_t pgno; u_int32_t pgsize; + off_t relative; { DB_ENV *dbenv; off_t offset; @@ -33,7 +35,7 @@ __os_truncate(env, fhp, pgno, pgsize) * Truncate a file so that "pgno" is discarded from the end of the * file. */ - offset = (off_t)pgsize * pgno; + offset = (off_t)pgsize * pgno + relative; if (dbenv != NULL && FLD_ISSET(dbenv->verbose, DB_VERB_FILEOPS | DB_VERB_FILEOPS_ALL)) |