aboutsummaryrefslogtreecommitdiff
path: root/src/os_unix.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2011-12-14 18:33:13 +0000
committerdrh <drh@noemail.net>2011-12-14 18:33:13 +0000
commita60ef3d570073cc78c066442d23ec7cd9453ee55 (patch)
treee5a0b0f22c5efb35424cd81ba7588436964df18a /src/os_unix.c
parent6ca514b075afe07eee51dbeb6910ab4022e567eb (diff)
parent0f2ab8db33f82743ea49b5b11e5f10a8923ed6fb (diff)
downloadsqlite-a60ef3d570073cc78c066442d23ec7cd9453ee55.tar.gz
sqlite-a60ef3d570073cc78c066442d23ec7cd9453ee55.zip
Merge the nx-devkit changes into trunk. This includes the new
SQLITE_FCNTL_VFSNAME file-control. FossilOrigin-Name: da118e02c0576ce16f7a26663f59413316223d55
Diffstat (limited to 'src/os_unix.c')
-rw-r--r--src/os_unix.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/os_unix.c b/src/os_unix.c
index 51778c861..ee5971f10 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -206,6 +206,7 @@ struct UnixUnusedFd {
typedef struct unixFile unixFile;
struct unixFile {
sqlite3_io_methods const *pMethod; /* Always the first entry */
+ sqlite3_vfs *pVfs; /* The VFS that created this unixFile */
unixInodeInfo *pInode; /* Info about locks on this inode */
int h; /* The file descriptor */
unsigned char eFileLock; /* The type of lock held on this fd */
@@ -3533,6 +3534,10 @@ static int unixFileControl(sqlite3_file *id, int op, void *pArg){
}
return SQLITE_OK;
}
+ case SQLITE_FCNTL_VFSNAME: {
+ *(char**)pArg = sqlite3_mprintf("%s", pFile->pVfs->zName);
+ return SQLITE_OK;
+ }
#ifndef NDEBUG
/* The pager calls this method to signal that it has done
** a rollback and that the database is therefore unchanged and
@@ -4560,6 +4565,7 @@ static int fillInUnixFile(
OSTRACE(("OPEN %-3d %s\n", h, zFilename));
pNew->h = h;
+ pNew->pVfs = pVfs;
pNew->zPath = zFilename;
if( memcmp(pVfs->zName,"unix-excl",10)==0 ){
pNew->ctrlFlags = UNIXFILE_EXCL;