aboutsummaryrefslogtreecommitdiff
path: root/src/os_unix.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2004-06-17 19:04:17 +0000
committerdrh <drh@noemail.net>2004-06-17 19:04:17 +0000
commita2854229224e9e13eab1a9e9031057e6a259c38c (patch)
tree608670e63ac885138ca20be138bbc2d1ac794d2c /src/os_unix.c
parentededfd5e83236dfa0359ff8eade6de0c269016ec (diff)
downloadsqlite-a2854229224e9e13eab1a9e9031057e6a259c38c.tar.gz
sqlite-a2854229224e9e13eab1a9e9031057e6a259c38c.zip
Documentation updates in preparation for the release of version 3.0.0. (CVS 1613)
FossilOrigin-Name: 9fb29f7331254b601b71f0fe7d77f91915272dc7
Diffstat (limited to 'src/os_unix.c')
-rw-r--r--src/os_unix.c21
1 files changed, 13 insertions, 8 deletions
diff --git a/src/os_unix.c b/src/os_unix.c
index 9087347fc..c096b6a00 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -607,17 +607,22 @@ int sqlite3OsSeek(OsFile *id, off_t offset){
int sqlite3OsSync(OsFile *id){
SimulateIOError(SQLITE_IOERR);
TRACE2("SYNC %-3d\n", id->h);
+{
+off_t sz;
+sqlite3OsFileSize(id, &sz);
+fprintf(stderr,"SYNC %d size=%lld... ", id->h, sz);
+}
if( fsync(id->h) ){
return SQLITE_IOERR;
- }else{
- if( id->dirfd>=0 ){
- TRACE2("DIRSYNC %-3d\n", id->dirfd);
- fsync(id->dirfd);
- close(id->dirfd); /* Only need to sync once, so close the directory */
- id->dirfd = -1; /* when we are done. */
- }
- return SQLITE_OK;
}
+ if( id->dirfd>=0 ){
+ TRACE2("DIRSYNC %-3d\n", id->dirfd);
+ fsync(id->dirfd);
+ close(id->dirfd); /* Only need to sync once, so close the directory */
+ id->dirfd = -1; /* when we are done. */
+ }
+fprintf(stderr,"DONE\n");
+ return SQLITE_OK;
}
/*