summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;