Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Fix for the test_devsym.c test module for the VFS-SHM refactoring. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | wal-refactor |
Files: | files | file ages | folders |
SHA1: |
49d62933759d4e160ee3a4dd2aa316a2 |
User & Date: | drh 2010-05-12 18:30:36.000 |
Context
2010-05-13
| ||
06:19 | Modify the VFS in test_vfs.c to match the refactoring of the xShmXXX methods. (check-in: 25e72f8156 user: dan tags: wal-refactor) | |
2010-05-12
| ||
18:30 | Fix for the test_devsym.c test module for the VFS-SHM refactoring. (check-in: 49d6293375 user: drh tags: wal-refactor) | |
18:10 | A couple simple fixes to get wal.test mostly working. (check-in: c744581274 user: drh tags: wal-refactor) | |
Changes
Changes to src/test_devsym.c.
︙ | ︙ | |||
46 47 48 49 50 51 52 53 54 55 56 57 58 59 | static int devsymFileSize(sqlite3_file*, sqlite3_int64 *pSize); static int devsymLock(sqlite3_file*, int); static int devsymUnlock(sqlite3_file*, int); static int devsymCheckReservedLock(sqlite3_file*, int *); static int devsymFileControl(sqlite3_file*, int op, void *pArg); static int devsymSectorSize(sqlite3_file*); static int devsymDeviceCharacteristics(sqlite3_file*); /* ** Method declarations for devsym_vfs. */ static int devsymOpen(sqlite3_vfs*, const char *, sqlite3_file*, int , int *); static int devsymDelete(sqlite3_vfs*, const char *zName, int syncDir); static int devsymAccess(sqlite3_vfs*, const char *zName, int flags, int *); | > > > > > > | 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 | static int devsymFileSize(sqlite3_file*, sqlite3_int64 *pSize); static int devsymLock(sqlite3_file*, int); static int devsymUnlock(sqlite3_file*, int); static int devsymCheckReservedLock(sqlite3_file*, int *); static int devsymFileControl(sqlite3_file*, int op, void *pArg); static int devsymSectorSize(sqlite3_file*); static int devsymDeviceCharacteristics(sqlite3_file*); static int devsymShmOpen(sqlite3_file*); static int devsymShmSize(sqlite3_file*,int,int*); static int devsymShmGet(sqlite3_file*,int,int*,void**); static int devsymShmRelease(sqlite3_file*); static int devsymShmLock(sqlite3_file*,int,int*); static int devsymShmClose(sqlite3_file*,int); /* ** Method declarations for devsym_vfs. */ static int devsymOpen(sqlite3_vfs*, const char *, sqlite3_file*, int , int *); static int devsymDelete(sqlite3_vfs*, const char *zName, int syncDir); static int devsymAccess(sqlite3_vfs*, const char *zName, int flags, int *); |
︙ | ︙ | |||
108 109 110 111 112 113 114 | devsymFileSize, /* xFileSize */ devsymLock, /* xLock */ devsymUnlock, /* xUnlock */ devsymCheckReservedLock, /* xCheckReservedLock */ devsymFileControl, /* xFileControl */ devsymSectorSize, /* xSectorSize */ devsymDeviceCharacteristics, /* xDeviceCharacteristics */ | | | | | | | | 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 | devsymFileSize, /* xFileSize */ devsymLock, /* xLock */ devsymUnlock, /* xUnlock */ devsymCheckReservedLock, /* xCheckReservedLock */ devsymFileControl, /* xFileControl */ devsymSectorSize, /* xSectorSize */ devsymDeviceCharacteristics, /* xDeviceCharacteristics */ devsymShmOpen, /* xShmOpen */ devsymShmSize, /* xShmSize */ devsymShmGet, /* xShmGet */ devsymShmRelease, /* xShmRelease */ devsymShmLock, /* xShmLock */ devsymShmClose /* xShmClose */ }; struct DevsymGlobal { sqlite3_vfs *pVfs; int iDeviceChar; int iSectorSize; }; |
︙ | ︙ | |||
226 227 228 229 230 231 232 233 234 235 236 237 238 239 | /* ** Return the device characteristic flags supported by an devsym-file. */ static int devsymDeviceCharacteristics(sqlite3_file *pFile){ return g.iDeviceChar; } /* ** Open an devsym file handle. */ static int devsymOpen( sqlite3_vfs *pVfs, const char *zName, | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 | /* ** Return the device characteristic flags supported by an devsym-file. */ static int devsymDeviceCharacteristics(sqlite3_file *pFile){ return g.iDeviceChar; } /* ** Shared-memory methods are all pass-thrus. */ static int devsymShmOpen(sqlite3_file *pFile){ devsym_file *p = (devsym_file *)pFile; return sqlite3OsShmOpen(p->pReal); } static int devsymShmSize(sqlite3_file *pFile, int reqSize, int *pSize){ devsym_file *p = (devsym_file *)pFile; return sqlite3OsShmSize(p->pReal, reqSize, pSize); } static int devsymShmGet(sqlite3_file *pFile, int reqSz, int *pSize, void **pp){ devsym_file *p = (devsym_file *)pFile; return sqlite3OsShmGet(p->pReal, reqSz, pSize, pp); } static int devsymShmRelease(sqlite3_file *pFile){ devsym_file *p = (devsym_file *)pFile; return sqlite3OsShmRelease(p->pReal); } static int devsymShmLock(sqlite3_file *pFile, int desired, int *pGot){ devsym_file *p = (devsym_file *)pFile; return sqlite3OsShmLock(p->pReal, desired, pGot); } static int devsymShmClose(sqlite3_file *pFile, int delFlag){ devsym_file *p = (devsym_file *)pFile; return sqlite3OsShmClose(p->pReal, delFlag); } /* ** Open an devsym file handle. */ static int devsymOpen( sqlite3_vfs *pVfs, const char *zName, |
︙ | ︙ |