aboutsummaryrefslogtreecommitdiff
path: root/src/os_unix.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2011-12-14 18:28:18 +0000
committerdrh <drh@noemail.net>2011-12-14 18:28:18 +0000
commit0f2ab8db33f82743ea49b5b11e5f10a8923ed6fb (patch)
treeba23ebb1b6eaca6ab90ac982ba96de63acc183f1 /src/os_unix.c
parent43a6d4bd4434ef62572c98264aaaf4d01b71c4ac (diff)
parentde60fc2d87a9483cfc1e60ca04381dc07079920b (diff)
downloadsqlite-0f2ab8db33f82743ea49b5b11e5f10a8923ed6fb.tar.gz
sqlite-0f2ab8db33f82743ea49b5b11e5f10a8923ed6fb.zip
Merge the VFSNAME file-control addition into the nx-devkit branch.
FossilOrigin-Name: 08c1dc517c1340737a55ad9012b7b06f72899c6f
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 ecd5bf244..3cb28b058 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;