aboutsummaryrefslogtreecommitdiff
path: root/src/shell.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2016-01-14 14:48:17 +0000
committerdrh <drh@noemail.net>2016-01-14 14:48:17 +0000
commitcb75bff3f7fe12fd3d5dd94acd2832ef1e0dcb65 (patch)
treeda3eeb2fcab166e7e3b9e23526184dc84e286352 /src/shell.c
parent604ce70448d0572477ad25bb3510b1dc3f2ad967 (diff)
parent0ea94db612e0f2348b45dafcedf21d9a8f68c60b (diff)
downloadsqlite-cb75bff3f7fe12fd3d5dd94acd2832ef1e0dcb65.tar.gz
sqlite-cb75bff3f7fe12fd3d5dd94acd2832ef1e0dcb65.zip
Merge the latest fixes and enhancements from trunk.
FossilOrigin-Name: 007e5c6df60f9743ac6914332f59925e4a7a861c
Diffstat (limited to 'src/shell.c')
-rw-r--r--src/shell.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/shell.c b/src/shell.c
index 74b399070..00893e955 100644
--- a/src/shell.c
+++ b/src/shell.c
@@ -1941,6 +1941,7 @@ static char zHelp[] =
".timer on|off Turn SQL timer on or off\n"
".trace FILE|off Output each SQL statement as it is run\n"
".vfsinfo ?AUX? Information about the top-level VFS\n"
+ ".vfslist List all available VFSes\n"
".vfsname ?AUX? Print the name of the VFS stack\n"
".width NUM1 NUM2 ... Set column widths for \"column\" mode\n"
" Negative values right-justify\n"
@@ -4451,6 +4452,24 @@ static int do_meta_command(char *zLine, ShellState *p){
}
}else
+ if( c=='v' && strncmp(azArg[0], "vfslist", n)==0 ){
+ sqlite3_vfs *pVfs;
+ sqlite3_vfs *pCurrent = 0;
+ if( p->db ){
+ sqlite3_file_control(p->db, "main", SQLITE_FCNTL_VFS_POINTER, &pCurrent);
+ }
+ for(pVfs=sqlite3_vfs_find(0); pVfs; pVfs=pVfs->pNext){
+ utf8_printf(p->out, "vfs.zName = \"%s\"%s\n", pVfs->zName,
+ pVfs==pCurrent ? " <--- CURRENT" : "");
+ raw_printf(p->out, "vfs.iVersion = %d\n", pVfs->iVersion);
+ raw_printf(p->out, "vfs.szOsFile = %d\n", pVfs->szOsFile);
+ raw_printf(p->out, "vfs.mxPathname = %d\n", pVfs->mxPathname);
+ if( pVfs->pNext ){
+ raw_printf(p->out, "-----------------------------------\n");
+ }
+ }
+ }else
+
if( c=='v' && strncmp(azArg[0], "vfsname", n)==0 ){
const char *zDbName = nArg==2 ? azArg[1] : "main";
char *zVfsName = 0;