/ Check-in [4e978a40]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:fix a few return codes in the OS/2 VFS (CVS 5817)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 4e978a40f7ee93b09093e82173edc74a992aadeb
User & Date: pweilbacher 2008-10-13 21:46:47
Context
2008-10-14
14:28
Modifications to main.mk so that -DSQLITE_ENABLE_FTS3 works. (CVS 5818) check-in: a06d226d user: danielk1977 tags: trunk
2008-10-13
21:46
fix a few return codes in the OS/2 VFS (CVS 5817) check-in: 4e978a40 user: pweilbacher tags: trunk
17:09
Get the load extension tests working on amd64. Needed for test coverage. (CVS 5816) check-in: 119b69fb user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/os_os2.c.

     8      8   **    May you find forgiveness for yourself and forgive others.
     9      9   **    May you share freely, never taking more than you give.
    10     10   **
    11     11   ******************************************************************************
    12     12   **
    13     13   ** This file contains code that is specific to OS/2.
    14     14   **
    15         -** $Id: os_os2.c,v 1.56 2008/08/22 13:47:57 pweilbacher Exp $
           15  +** $Id: os_os2.c,v 1.57 2008/10/13 21:46:47 pweilbacher Exp $
    16     16   */
    17     17   
    18     18   #include "sqliteInt.h"
    19     19   
    20     20   #if SQLITE_OS_OS2
    21     21   
    22     22   /*
................................................................................
   167    167   */
   168    168   static int os2Truncate( sqlite3_file *id, i64 nByte ){
   169    169     APIRET rc = NO_ERROR;
   170    170     os2File *pFile = (os2File*)id;
   171    171     OSTRACE3( "TRUNCATE %d %lld\n", pFile->h, nByte );
   172    172     SimulateIOError( return SQLITE_IOERR_TRUNCATE );
   173    173     rc = DosSetFileSize( pFile->h, nByte );
   174         -  return rc == NO_ERROR ? SQLITE_OK : SQLITE_IOERR;
          174  +  return rc == NO_ERROR ? SQLITE_OK : SQLITE_IOERR_TRUNCATE;
   175    175   }
   176    176   
   177    177   #ifdef SQLITE_TEST
   178    178   /*
   179    179   ** Count the number of fullsyncs and normal syncs.  This is used to test
   180    180   ** that syncs and fullsyncs are occuring at the right times.
   181    181   */
................................................................................
   202    202   ** Determine the current size of a file in bytes
   203    203   */
   204    204   static int os2FileSize( sqlite3_file *id, sqlite3_int64 *pSize ){
   205    205     APIRET rc = NO_ERROR;
   206    206     FILESTATUS3 fsts3FileInfo;
   207    207     memset(&fsts3FileInfo, 0, sizeof(fsts3FileInfo));
   208    208     assert( id!=0 );
   209         -  SimulateIOError( return SQLITE_IOERR );
          209  +  SimulateIOError( return SQLITE_IOERR_FSTAT );
   210    210     rc = DosQueryFileInfo( ((os2File*)id)->h, FIL_STANDARD, &fsts3FileInfo, sizeof(FILESTATUS3) );
   211    211     if( rc == NO_ERROR ){
   212    212       *pSize = fsts3FileInfo.cbFile;
   213    213       return SQLITE_OK;
   214    214     }else{
   215         -    return SQLITE_IOERR;
          215  +    return SQLITE_IOERR_FSTAT;
   216    216     }
   217    217   }
   218    218   
   219    219   /*
   220    220   ** Acquire a reader lock.
   221    221   */
   222    222   static int getReadLock( os2File *pFile ){
................................................................................
   860    860   ){
   861    861     APIRET rc = NO_ERROR;
   862    862     char *zFilenameCp = convertUtf8PathToCp( zFilename );
   863    863     SimulateIOError( return SQLITE_IOERR_DELETE );
   864    864     rc = DosDelete( (PSZ)zFilenameCp );
   865    865     free( zFilenameCp );
   866    866     OSTRACE2( "DELETE \"%s\"\n", zFilename );
   867         -  return rc == NO_ERROR ? SQLITE_OK : SQLITE_IOERR;
          867  +  return rc == NO_ERROR ? SQLITE_OK : SQLITE_IOERR_DELETE;
   868    868   }
   869    869   
   870    870   /*
   871    871   ** Check the existance and status of a file.
   872    872   */
   873    873   static int os2Access(
   874    874     sqlite3_vfs *pVfs,        /* Not used on os2 */