2 * See the file LICENSE for redistribution information.
4 * Copyright (c) 2004-2009 Oracle. All rights reserved.
18 __os_truncate(env, fhp, pgno, pgsize)
28 FILE_MANAGER_CREATE(env, pIFileMgr, ret);
33 * Truncate a file so that "pgno" is discarded from the end of the
36 offset = (off_t)pgsize * pgno;
38 LAST_PANIC_CHECK_BEFORE_IO(env);
40 if (IFILE_Truncate(fhp->ifp, offset) == SUCCESS)
43 FILE_MANAGER_ERR(env, pIFileMgr, NULL, "IFILE_Truncate", ret);
45 IFILEMGR_Release(pIFileMgr);