@@ -28484,7 +28484,7 @@ static int unixFileSize(sqlite3_file *id, i64 *pSize){
28484
28484
SimulateIOError( rc=1 );
28485
28485
if( rc!=0 ){
28486
28486
((unixFile*)id)->lastErrno = errno;
28487
- return SQLITE_IOERR_FSTAT;
28487
+ return unixLogError( SQLITE_IOERR_FSTAT, "fstat", ((unixFile*)id)->zPath) ;
28488
28488
}
28489
28489
*pSize = buf.st_size;
28490
28490
@@ -28519,7 +28519,9 @@ static int fcntlSizeHint(unixFile *pFile, i64 nByte){
28519
28519
i64 nSize; /* Required file size */
28520
28520
struct stat buf; /* Used to hold return values of fstat() */
28521
28521
28522
- if( osFstat(pFile->h, &buf) ) return SQLITE_IOERR_FSTAT;
28522
+ if( osFstat(pFile->h, &buf) ) {
28523
+ return unixLogError(SQLITE_IOERR_FSTAT, "fstat", pFile->zPath);
28524
+ }
28523
28525
28524
28526
nSize = ((nByte+pFile->szChunk-1) / pFile->szChunk) * pFile->szChunk;
28525
28527
if( nSize>(i64)buf.st_size ){
@@ -28917,7 +28919,7 @@ static int unixOpenSharedMemory(unixFile *pDbFd){
28917
28919
** with the same permissions.
28918
28920
*/
28919
28921
if( osFstat(pDbFd->h, &sStat) && pInode->bProcessLock==0 ){
28920
- rc = SQLITE_IOERR_FSTAT;
28922
+ rc = unixLogError( SQLITE_IOERR_FSTAT, "fstat", pDbFd->zPath) ;
28921
28923
goto shm_open_err;
28922
28924
}
28923
28925
@@ -30006,7 +30008,7 @@ static int findCreateFileMode(
30006
30008
*pUid = sStat.st_uid;
30007
30009
*pGid = sStat.st_gid;
30008
30010
}else{
30009
- rc = SQLITE_IOERR_FSTAT;
30011
+ rc = unixLogError( SQLITE_IOERR_FSTAT, "stat", zDb) ;
30010
30012
}
30011
30013
}else if( flags & SQLITE_OPEN_DELETEONCLOSE ){
30012
30014
*pMode = 0600;
0 commit comments