#include <sqlite3.h>
#include <assert.h>
#include <dlfcn.h>
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <sys/types.h>
#include <time.h>
#include <unistd.h>
Go to the source code of this file.
Classes | |
struct | unixFileId |
struct | UnixUnusedFd |
struct | unixInodeInfo |
struct | unixFile |
struct | unix_syscall |
Macros | |
#define | SQLITE_OPEN_WAL 0x00080000 /* VFS only */ |
#define | SQLITE_FCNTL_SIZE_HINT 5 |
#define | SQLITE_FCNTL_CHUNK_SIZE 6 |
#define | SQLITE_FCNTL_SYNC_OMITTED 8 |
#define | SQLITE_FCNTL_DB_UNCHANGED 0xca093fa0 |
#define | SQLITE_DEFAULT_SECTOR_SIZE 512 |
#define | UNUSED_PARAMETER(x) (void)(x) |
#define | UNUSED_PARAMETER2(x, y) UNUSED_PARAMETER(x),UNUSED_PARAMETER(y) |
#define | ArraySize(X) ((int)(sizeof(X)/sizeof(X[0]))) |
#define | _LARGE_FILE 1 |
#define | _FILE_OFFSET_BITS 64 |
#define | _LARGEFILE_SOURCE 1 |
#define | SQLITE_DEFAULT_FILE_PERMISSIONS 0644 |
#define | MAX_PATHNAME 512 |
#define | SQLITE_TEMP_FILE_PREFIX "etilqs_" |
#define | UNIXFILE_EXCL 0x01 /* Connections from one process only */ |
#define | UNIXFILE_RDONLY 0x02 /* Connection is read only */ |
#define | O_LARGEFILE 0 |
#define | O_NOFOLLOW 0 |
#define | O_BINARY 0 |
#define | SQLITE_CANTOPEN_BKPT sqlite3CantopenError(__LINE__) |
#define | osOpen ((int(*)(const char*,int,...))aSyscall[0].pCurrent) |
#define | osClose ((int(*)(int))aSyscall[1].pCurrent) |
#define | osAccess ((int(*)(const char*,int))aSyscall[2].pCurrent) |
#define | osGetcwd ((char*(*)(char*,size_t))aSyscall[3].pCurrent) |
#define | osStat ((int(*)(const char*,struct stat*))aSyscall[4].pCurrent) |
#define | osFstat ((int(*)(int,struct stat*))aSyscall[5].pCurrent) |
#define | osFtruncate ((int(*)(int,off_t))aSyscall[6].pCurrent) |
#define | osFcntl ((int(*)(int,int,...))aSyscall[7].pCurrent) |
#define | osRead ((ssize_t(*)(int,void*,size_t))aSyscall[8].pCurrent) |
#define | osPread ((ssize_t(*)(int,void*,size_t,off_t))aSyscall[9].pCurrent) |
#define | osPread64 ((ssize_t(*)(int,void*,size_t,off_t))aSyscall[10].pCurrent) |
#define | osWrite ((ssize_t(*)(int,const void*,size_t))aSyscall[11].pCurrent) |
#define | osPwrite |
#define | osPwrite64 |
#define | osFchmod ((int(*)(int,mode_t))aSyscall[14].pCurrent) |
#define | osFallocate ((int(*)(int,off_t,off_t))aSyscall[15].pCurrent) |
#define | unixLogError(a, b, c) unixLogErrorAtLine(a,b,c,__LINE__) |
#define | UNIXVFS(VFSNAME, FINDER) |
Typedefs | |
typedef sqlite_int64 | i64 |
typedef struct unixShmNode | unixShmNode |
typedef struct unixFile | unixFile |
typedef const sqlite3_io_methods *(* | finder_type) (const char *, unixFile *) |
Functions | |
static int | sqlite3CantopenError (int lineno) |
static int | sqlite3Strlen30 (const char *z) |
static const sqlite3_io_methods * | nolockIoFinderImpl (const char *z, unixFile *p) |
static int | unixLogErrorAtLine (int errcode, const char *zFunc, const char *zPath, int iLine) |
static int | robust_open (const char *z, int f, int m) |
static void | robust_close (unixFile *pFile, int h, int lineno) |
static int | robust_ftruncate (int h, sqlite3_int64 sz) |
static int | fillInUnixFile (sqlite3_vfs *pVfs, int h, int dirfd, sqlite3_file *pId, const char *zFilename, int noLock, int isDelete, int isReadOnly) |
static int | openDirectory (const char *zFilename, int *pFd) |
static const char * | unixTempFileDir (void) |
static int | unixGetTempname (int nBuf, char *zBuf) |
static struct UnixUnusedFd * | findReusableFd (const char *zPath, int flags) |
static int | findCreateFileMode (const char *zPath, int flags, mode_t *pMode) |
static int | fcntlSizeHint (unixFile *pFile, i64 nByte) |
static int | full_fsync (int fd, int fullSync, int dataOnly) |
static int | seekAndRead (unixFile *id, sqlite3_int64 offset, void *pBuf, int cnt) |
static int | seekAndWrite (unixFile *id, i64 offset, const void *pBuf, int cnt) |
static int | nolockClose (sqlite3_file *id) |
static int | unixRead (sqlite3_file *id, void *pBuf, int amt, sqlite3_int64 offset) |
static int | unixWrite (sqlite3_file *id, const void *pBuf, int amt, sqlite3_int64 offset) |
static int | unixTruncate (sqlite3_file *id, i64 nByte) |
static int | unixSync (sqlite3_file *id, int flags) |
static int | unixFileSize (sqlite3_file *id, i64 *pSize) |
static int | nolockLock (sqlite3_file *NotUsed, int NotUsed2) |
static int | nolockUnlock (sqlite3_file *NotUsed, int NotUsed2) |
static int | nolockCheckReservedLock (sqlite3_file *NotUsed, int *pResOut) |
static int | unixFileControl (sqlite3_file *id, int op, void *pArg) |
static int | unixSectorSize (sqlite3_file *NotUsed) |
static int | unixDeviceCharacteristics (sqlite3_file *NotUsed) |
static int | unixOpen (sqlite3_vfs *pVfs, const char *zPath, sqlite3_file *pFile, int flags, int *pOutFlags) |
static int | unixDelete (sqlite3_vfs *NotUsed, const char *zPath, int dirSync) |
static int | unixAccess (sqlite3_vfs *NotUsed, const char *zPath, int flags, int *pResOut) |
static int | unixFullPathname (sqlite3_vfs *pVfs, const char *zPath, int nOut, char *zOut) |
static void * | unixDlOpen (sqlite3_vfs *NotUsed, const char *zFilename) |
static void | unixDlError (sqlite3_vfs *NotUsed, int nBuf, char *zBufOut) |
static void | unixDlClose (sqlite3_vfs *NotUsed, void *pHandle) |
static int | unixRandomness (sqlite3_vfs *NotUsed, int nBuf, char *zBuf) |
static int | unixSleep (sqlite3_vfs *NotUsed, int microseconds) |
static int | unixCurrentTime (sqlite3_vfs *NotUsed, double *prNow) |
static int | unixGetLastError (sqlite3_vfs *NotUsed, int NotUsed2, char *NotUsed3) |
static int | unixCurrentTimeInt64 (sqlite3_vfs *NotUsed, sqlite3_int64 *piNow) |
static int | unixSetSystemCall (sqlite3_vfs *pNotUsed, const char *zName, sqlite3_syscall_ptr pNewFunc) |
static sqlite3_syscall_ptr | unixGetSystemCall (sqlite3_vfs *pNotUsed, const char *zName) |
static const char * | unixNextSystemCall (sqlite3_vfs *p, const char *zName) |
int | sqlite3_os_init (void) |
static int | closeUnixFile (sqlite3_file *id) |
int | myvfs_init (void) |
Variables | |
static struct unixInodeInfo * | inodeList = 0 |
static void(*)(void) | unixDlSym (sqlite3_vfs *NotUsed, void *p, const char *zSym) |
static struct unix_syscall | aSyscall [] |
static const sqlite3_io_methods | nolockIoMethods |
static const sqlite3_io_methods *(*const | nolockIoFinder )(const char *, unixFile *p) = nolockIoFinderImpl |
#define osAccess ((int(*)(const char*,int))aSyscall[2].pCurrent) |
#define osClose ((int(*)(int))aSyscall[1].pCurrent) |
#define osFallocate ((int(*)(int,off_t,off_t))aSyscall[15].pCurrent) |
#define osFchmod ((int(*)(int,mode_t))aSyscall[14].pCurrent) |
#define osFcntl ((int(*)(int,int,...))aSyscall[7].pCurrent) |
#define osFstat ((int(*)(int,struct stat*))aSyscall[5].pCurrent) |
#define osFtruncate ((int(*)(int,off_t))aSyscall[6].pCurrent) |
#define osGetcwd ((char*(*)(char*,size_t))aSyscall[3].pCurrent) |
#define osOpen ((int(*)(const char*,int,...))aSyscall[0].pCurrent) |
#define osPread ((ssize_t(*)(int,void*,size_t,off_t))aSyscall[9].pCurrent) |
#define osPread64 ((ssize_t(*)(int,void*,size_t,off_t))aSyscall[10].pCurrent) |
#define osPwrite |
#define osPwrite64 |
#define osRead ((ssize_t(*)(int,void*,size_t))aSyscall[8].pCurrent) |
#define osStat ((int(*)(const char*,struct stat*))aSyscall[4].pCurrent) |
#define osWrite ((ssize_t(*)(int,const void*,size_t))aSyscall[11].pCurrent) |
#define SQLITE_CANTOPEN_BKPT sqlite3CantopenError(__LINE__) |
#define UNIXFILE_EXCL 0x01 /* Connections from one process only */ |
#define unixLogError | ( | a, | |
b, | |||
c | |||
) | unixLogErrorAtLine(a,b,c,__LINE__) |
#define UNIXVFS | ( | VFSNAME, | |
FINDER | |||
) |
#define UNUSED_PARAMETER2 | ( | x, | |
y | |||
) | UNUSED_PARAMETER(x),UNUSED_PARAMETER(y) |
typedef const sqlite3_io_methods*(* finder_type) (const char *, unixFile *) |
typedef struct unixShmNode unixShmNode |
|
static |
Definition at line 474 of file myvfs.c.
|
static |
Definition at line 493 of file myvfs.c.
|
static |
|
static |
Definition at line 667 of file myvfs.c.
|
static |
int myvfs_init | ( | void | ) |
Definition at line 1748 of file myvfs.c.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Definition at line 444 of file myvfs.c.
|
static |
|
static |
|
static |
Definition at line 852 of file myvfs.c.
Definition at line 883 of file myvfs.c.
int sqlite3_os_init | ( | void | ) |
|
static |
|
static |
Definition at line 1616 of file myvfs.c.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Definition at line 1147 of file myvfs.c.
|
static |
Definition at line 1102 of file myvfs.c.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Definition at line 1231 of file myvfs.c.
|
static |
Definition at line 1555 of file myvfs.c.
|
static |
Definition at line 921 of file myvfs.c.
|
static |
|
static |
|
static |
Definition at line 1057 of file myvfs.c.
|
static |
|
static |
Definition at line 1008 of file myvfs.c.
|
static |
Definition at line 955 of file myvfs.c.
|
static |
|
static |
|
static |
|
static |