diff options
author | danielk1977 <danielk1977@noemail.net> | 2005-11-25 10:38:22 +0000 |
---|---|---|
committer | danielk1977 <danielk1977@noemail.net> | 2005-11-25 10:38:22 +0000 |
commit | d7c03f7485362eec9ded4a1f65cdd532a38cac57 (patch) | |
tree | 857656d98c20385959b657baee17149b4287d99a /src/os_unix.c | |
parent | 26c5d79f6027e0dcc4c86679f854f18e5185edf7 (diff) | |
download | sqlite-d7c03f7485362eec9ded4a1f65cdd532a38cac57.tar.gz sqlite-d7c03f7485362eec9ded4a1f65cdd532a38cac57.zip |
Add the compilation option SQLITE_DISABLE_DIRSYNC (CVS 2782)
FossilOrigin-Name: f1298bb103aad46c737741d89d33c4c2904aec68
Diffstat (limited to 'src/os_unix.c')
-rw-r--r-- | src/os_unix.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/os_unix.c b/src/os_unix.c index 483075c83..2d6f40413 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -872,9 +872,11 @@ int sqlite3OsSync(OsFile *id, int dataOnly){ } if( id->dirfd>=0 ){ TRACE2("DIRSYNC %-3d\n", id->dirfd); +#ifndef SQLITE_DISABLE_DIRSYNC if( full_fsync(id->dirfd, id->fullSync, 0) ){ return SQLITE_IOERR; } +#endif close(id->dirfd); /* Only need to sync once, so close the directory */ id->dirfd = -1; /* when we are done. */ } @@ -890,6 +892,9 @@ int sqlite3OsSync(OsFile *id, int dataOnly){ ** The F_FULLFSYNC option is not needed here. */ int sqlite3OsSyncDirectory(const char *zDirname){ +#ifdef SQLITE_DISABLE_DIRSYNC + return SQLITE_OK; +#else int fd; int r; SimulateIOError(SQLITE_IOERR); @@ -901,6 +906,7 @@ int sqlite3OsSyncDirectory(const char *zDirname){ r = fsync(fd); close(fd); return ((r==0)?SQLITE_OK:SQLITE_IOERR); +#endif } /* |