1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-18 10:21:03 +03:00

fix a few return codes in the OS/2 VFS (CVS 5817)

FossilOrigin-Name: 4e978a40f7ee93b09093e82173edc74a992aadeb
This commit is contained in:
pweilbacher
2008-10-13 21:46:46 +00:00
parent 104d74c752
commit ab88e17ce3
3 changed files with 13 additions and 13 deletions

View File

@@ -12,7 +12,7 @@
**
** This file contains code that is specific to OS/2.
**
** $Id: os_os2.c,v 1.56 2008/08/22 13:47:57 pweilbacher Exp $
** $Id: os_os2.c,v 1.57 2008/10/13 21:46:47 pweilbacher Exp $
*/
#include "sqliteInt.h"
@@ -171,7 +171,7 @@ static int os2Truncate( sqlite3_file *id, i64 nByte ){
OSTRACE3( "TRUNCATE %d %lld\n", pFile->h, nByte );
SimulateIOError( return SQLITE_IOERR_TRUNCATE );
rc = DosSetFileSize( pFile->h, nByte );
return rc == NO_ERROR ? SQLITE_OK : SQLITE_IOERR;
return rc == NO_ERROR ? SQLITE_OK : SQLITE_IOERR_TRUNCATE;
}
#ifdef SQLITE_TEST
@@ -206,13 +206,13 @@ static int os2FileSize( sqlite3_file *id, sqlite3_int64 *pSize ){
FILESTATUS3 fsts3FileInfo;
memset(&fsts3FileInfo, 0, sizeof(fsts3FileInfo));
assert( id!=0 );
SimulateIOError( return SQLITE_IOERR );
SimulateIOError( return SQLITE_IOERR_FSTAT );
rc = DosQueryFileInfo( ((os2File*)id)->h, FIL_STANDARD, &fsts3FileInfo, sizeof(FILESTATUS3) );
if( rc == NO_ERROR ){
*pSize = fsts3FileInfo.cbFile;
return SQLITE_OK;
}else{
return SQLITE_IOERR;
return SQLITE_IOERR_FSTAT;
}
}
@@ -864,7 +864,7 @@ static int os2Delete(
rc = DosDelete( (PSZ)zFilenameCp );
free( zFilenameCp );
OSTRACE2( "DELETE \"%s\"\n", zFilename );
return rc == NO_ERROR ? SQLITE_OK : SQLITE_IOERR;
return rc == NO_ERROR ? SQLITE_OK : SQLITE_IOERR_DELETE;
}
/*