static int vfslogOpen( sqlite3_vfs *pVfs, const char *zName, sqlite3_file *pFile, int flags, int *pOutFlags ){ int rc; sqlite3_uint64 t; VfslogFile *p = (VfslogFile *)pFile; VfslogVfs *pLog = (VfslogVfs *)pVfs; pFile->pMethods = &vfslog_io_methods; p->pReal = (sqlite3_file *)&p[1]; p->pVfslog = pVfs; p->iFileId = ++pLog->iNextFileId; t = vfslog_time(); rc = REALVFS(pVfs)->xOpen(REALVFS(pVfs), zName, p->pReal, flags, pOutFlags); t = vfslog_time() - t; vfslog_call(pVfs, OS_OPEN, p->iFileId, t, rc, 0, 0); vfslog_string(pVfs, zName); return rc; }
static int vfslogFullPathname( sqlite3_vfs *pVfs, const char *zPath, int nOut, char *zOut ){ return REALVFS(pVfs)->xFullPathname(REALVFS(pVfs), zPath, nOut, zOut); }
static int vfslogDelete(sqlite3_vfs *pVfs, const char *zPath, int dirSync){ int rc; sqlite3_uint64 t; t = vfslog_time(); rc = REALVFS(pVfs)->xDelete(REALVFS(pVfs), zPath, dirSync); t = vfslog_time() - t; vfslog_call(pVfs, OS_DELETE, 0, t, rc, dirSync, 0); vfslog_string(pVfs, zPath); return rc; }
/* ** Test for access permissions. Return true if the requested permission ** is available, or false otherwise. */ static int instAccess( sqlite3_vfs *pVfs, const char *zPath, int flags, int *pResOut ){ binarylog_blob(pVfs, zPath, -1, 0); OS_TIME_VFS(OS_ACCESS, zPath, 0, flags, *pResOut, REALVFS(pVfs)->xAccess(REALVFS(pVfs), zPath, flags, pResOut) ); }
static int vfslogAccess( sqlite3_vfs *pVfs, const char *zPath, int flags, int *pResOut ){ int rc; sqlite3_uint64 t; t = vfslog_time(); rc = REALVFS(pVfs)->xAccess(REALVFS(pVfs), zPath, flags, pResOut); t = vfslog_time() - t; vfslog_call(pVfs, OS_ACCESS, 0, t, rc, flags, *pResOut); vfslog_string(pVfs, zPath); return rc; }
/* ** Open an inst file handle. */ static int instOpen( sqlite3_vfs *pVfs, const char *zName, sqlite3_file *pFile, int flags, int *pOutFlags ){ inst_file *p = (inst_file *)pFile; pFile->pMethods = &inst_io_methods; p->pReal = (sqlite3_file *)&p[1]; p->pInstVfs = (InstVfs *)pVfs; p->zName = zName; p->flags = flags; p->iFileId = ++p->pInstVfs->iNextFileId; binarylog_blob(pVfs, zName, -1, 0); OS_TIME_VFS(OS_OPEN, zName, flags, p->iFileId, 0, REALVFS(pVfs)->xOpen(REALVFS(pVfs), zName, p->pReal, flags, pOutFlags) ); }
static int vfslogCurrentTimeInt64(sqlite3_vfs *pVfs, sqlite3_int64 *p){ return REALVFS(pVfs)->xCurrentTimeInt64(REALVFS(pVfs), p); }
static int vfslogGetLastError(sqlite3_vfs *pVfs, int a, char *b){ return REALVFS(pVfs)->xGetLastError(REALVFS(pVfs), a, b); }
static int vfslogCurrentTime(sqlite3_vfs *pVfs, double *pTimeOut){ return REALVFS(pVfs)->xCurrentTime(REALVFS(pVfs), pTimeOut); }
static int vfslogSleep(sqlite3_vfs *pVfs, int nMicro){ return REALVFS(pVfs)->xSleep(REALVFS(pVfs), nMicro); }
static int vfslogRandomness(sqlite3_vfs *pVfs, int nByte, char *zBufOut){ return REALVFS(pVfs)->xRandomness(REALVFS(pVfs), nByte, zBufOut); }
static void vfslogDlClose(sqlite3_vfs *pVfs, void *pHandle){ REALVFS(pVfs)->xDlClose(REALVFS(pVfs), pHandle); }
static void (*vfslogDlSym(sqlite3_vfs *pVfs, void *p, const char *zSym))(void){ return REALVFS(pVfs)->xDlSym(REALVFS(pVfs), p, zSym); }
static void vfslogDlError(sqlite3_vfs *pVfs, int nByte, char *zErrMsg){ REALVFS(pVfs)->xDlError(REALVFS(pVfs), nByte, zErrMsg); }
static void *vfslogDlOpen(sqlite3_vfs *pVfs, const char *zPath){ return REALVFS(pVfs)->xDlOpen(REALVFS(pVfs), zPath); }
/* ** Delete the file located at zPath. If the dirSync argument is true, ** ensure the file-system modifications are synced to disk before ** returning. */ static int instDelete(sqlite3_vfs *pVfs, const char *zPath, int dirSync){ binarylog_blob(pVfs, zPath, -1, 0); OS_TIME_VFS(OS_DELETE, zPath, 0, dirSync, 0, REALVFS(pVfs)->xDelete(REALVFS(pVfs), zPath, dirSync) ); }