summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Brown <jeffbrown@google.com>2012-06-14 18:48:03 -0700
committerJeff Brown <jeffbrown@google.com>2012-06-14 18:48:03 -0700
commit42c3f41862cfff8d4539903e47a42cae97d13d37 (patch)
treeb03a2be712a37c421142184b796c7adcb57d5bac
parent61fb99d904081bad56cfdba3f5165c59c5aa94f1 (diff)
downloadsqlite-jb-mr1-dev.tar.gz
Bug: 6538393 Change-Id: Iaa20c8bc01c53da08ff18cb1efae80c2be0b0584
-rw-r--r--dist/sqlite3.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/dist/sqlite3.c b/dist/sqlite3.c
index d8bc421..abe6186 100644
--- a/dist/sqlite3.c
+++ b/dist/sqlite3.c
@@ -28484,7 +28484,7 @@ static int unixFileSize(sqlite3_file *id, i64 *pSize){
SimulateIOError( rc=1 );
if( rc!=0 ){
((unixFile*)id)->lastErrno = errno;
- return SQLITE_IOERR_FSTAT;
+ return unixLogError(SQLITE_IOERR_FSTAT, "fstat", ((unixFile*)id)->zPath);
}
*pSize = buf.st_size;
@@ -28519,7 +28519,9 @@ static int fcntlSizeHint(unixFile *pFile, i64 nByte){
i64 nSize; /* Required file size */
struct stat buf; /* Used to hold return values of fstat() */
- if( osFstat(pFile->h, &buf) ) return SQLITE_IOERR_FSTAT;
+ if( osFstat(pFile->h, &buf) ) {
+ return unixLogError(SQLITE_IOERR_FSTAT, "fstat", pFile->zPath);
+ }
nSize = ((nByte+pFile->szChunk-1) / pFile->szChunk) * pFile->szChunk;
if( nSize>(i64)buf.st_size ){
@@ -28917,7 +28919,7 @@ static int unixOpenSharedMemory(unixFile *pDbFd){
** with the same permissions.
*/
if( osFstat(pDbFd->h, &sStat) && pInode->bProcessLock==0 ){
- rc = SQLITE_IOERR_FSTAT;
+ rc = unixLogError(SQLITE_IOERR_FSTAT, "fstat", pDbFd->zPath);
goto shm_open_err;
}
@@ -30006,7 +30008,7 @@ static int findCreateFileMode(
*pUid = sStat.st_uid;
*pGid = sStat.st_gid;
}else{
- rc = SQLITE_IOERR_FSTAT;
+ rc = unixLogError(SQLITE_IOERR_FSTAT, "stat", zDb);
}
}else if( flags & SQLITE_OPEN_DELETEONCLOSE ){
*pMode = 0600;