Fossil SCM
Add the ".vfslist" command to "fossil sqlite"
Commit
42c4d8f2d537a87659c32463c1c72231b149f370
Parent
be81a2fd3cd569d…
1 file changed
+19
+19
| --- src/shell.c | ||
| +++ src/shell.c | ||
| @@ -1919,10 +1919,11 @@ | ||
| 1919 | 1919 | " LIKE pattern TABLE.\n" |
| 1920 | 1920 | ".timeout MS Try opening locked tables for MS milliseconds\n" |
| 1921 | 1921 | ".timer on|off Turn SQL timer on or off\n" |
| 1922 | 1922 | ".trace FILE|off Output each SQL statement as it is run\n" |
| 1923 | 1923 | ".vfsinfo ?AUX? Information about the top-level VFS\n" |
| 1924 | + ".vfslist List all available VFSes\n" | |
| 1924 | 1925 | ".vfsname ?AUX? Print the name of the VFS stack\n" |
| 1925 | 1926 | ".width NUM1 NUM2 ... Set column widths for \"column\" mode\n" |
| 1926 | 1927 | " Negative values right-justify\n" |
| 1927 | 1928 | ; |
| 1928 | 1929 | |
| @@ -4165,10 +4166,28 @@ | ||
| 4165 | 4166 | utf8_printf(p->out, "vfs.zName = \"%s\"\n", pVfs->zName); |
| 4166 | 4167 | raw_printf(p->out, "vfs.iVersion = %d\n", pVfs->iVersion); |
| 4167 | 4168 | raw_printf(p->out, "vfs.szOsFile = %d\n", pVfs->szOsFile); |
| 4168 | 4169 | raw_printf(p->out, "vfs.mxPathname = %d\n", pVfs->mxPathname); |
| 4169 | 4170 | } |
| 4171 | + } | |
| 4172 | + }else | |
| 4173 | + | |
| 4174 | + if( c=='v' && strncmp(azArg[0], "vfslist", n)==0 ){ | |
| 4175 | + sqlite3_vfs *pVfs; | |
| 4176 | + sqlite3_vfs *pCurrent = 0; | |
| 4177 | + if( p->db ){ | |
| 4178 | + sqlite3_file_control(p->db, "main", SQLITE_FCNTL_VFS_POINTER, &pCurrent); | |
| 4179 | + } | |
| 4180 | + for(pVfs=sqlite3_vfs_find(0); pVfs; pVfs=pVfs->pNext){ | |
| 4181 | + utf8_printf(p->out, "vfs.zName = \"%s\"%s\n", pVfs->zName, | |
| 4182 | + pVfs==pCurrent ? " <--- CURRENT" : ""); | |
| 4183 | + raw_printf(p->out, "vfs.iVersion = %d\n", pVfs->iVersion); | |
| 4184 | + raw_printf(p->out, "vfs.szOsFile = %d\n", pVfs->szOsFile); | |
| 4185 | + raw_printf(p->out, "vfs.mxPathname = %d\n", pVfs->mxPathname); | |
| 4186 | + if( pVfs->pNext ){ | |
| 4187 | + raw_printf(p->out, "-----------------------------------\n"); | |
| 4188 | + } | |
| 4170 | 4189 | } |
| 4171 | 4190 | }else |
| 4172 | 4191 | |
| 4173 | 4192 | if( c=='v' && strncmp(azArg[0], "vfsname", n)==0 ){ |
| 4174 | 4193 | const char *zDbName = nArg==2 ? azArg[1] : "main"; |
| 4175 | 4194 |
| --- src/shell.c | |
| +++ src/shell.c | |
| @@ -1919,10 +1919,11 @@ | |
| 1919 | " LIKE pattern TABLE.\n" |
| 1920 | ".timeout MS Try opening locked tables for MS milliseconds\n" |
| 1921 | ".timer on|off Turn SQL timer on or off\n" |
| 1922 | ".trace FILE|off Output each SQL statement as it is run\n" |
| 1923 | ".vfsinfo ?AUX? Information about the top-level VFS\n" |
| 1924 | ".vfsname ?AUX? Print the name of the VFS stack\n" |
| 1925 | ".width NUM1 NUM2 ... Set column widths for \"column\" mode\n" |
| 1926 | " Negative values right-justify\n" |
| 1927 | ; |
| 1928 | |
| @@ -4165,10 +4166,28 @@ | |
| 4165 | utf8_printf(p->out, "vfs.zName = \"%s\"\n", pVfs->zName); |
| 4166 | raw_printf(p->out, "vfs.iVersion = %d\n", pVfs->iVersion); |
| 4167 | raw_printf(p->out, "vfs.szOsFile = %d\n", pVfs->szOsFile); |
| 4168 | raw_printf(p->out, "vfs.mxPathname = %d\n", pVfs->mxPathname); |
| 4169 | } |
| 4170 | } |
| 4171 | }else |
| 4172 | |
| 4173 | if( c=='v' && strncmp(azArg[0], "vfsname", n)==0 ){ |
| 4174 | const char *zDbName = nArg==2 ? azArg[1] : "main"; |
| 4175 |
| --- src/shell.c | |
| +++ src/shell.c | |
| @@ -1919,10 +1919,11 @@ | |
| 1919 | " LIKE pattern TABLE.\n" |
| 1920 | ".timeout MS Try opening locked tables for MS milliseconds\n" |
| 1921 | ".timer on|off Turn SQL timer on or off\n" |
| 1922 | ".trace FILE|off Output each SQL statement as it is run\n" |
| 1923 | ".vfsinfo ?AUX? Information about the top-level VFS\n" |
| 1924 | ".vfslist List all available VFSes\n" |
| 1925 | ".vfsname ?AUX? Print the name of the VFS stack\n" |
| 1926 | ".width NUM1 NUM2 ... Set column widths for \"column\" mode\n" |
| 1927 | " Negative values right-justify\n" |
| 1928 | ; |
| 1929 | |
| @@ -4165,10 +4166,28 @@ | |
| 4166 | utf8_printf(p->out, "vfs.zName = \"%s\"\n", pVfs->zName); |
| 4167 | raw_printf(p->out, "vfs.iVersion = %d\n", pVfs->iVersion); |
| 4168 | raw_printf(p->out, "vfs.szOsFile = %d\n", pVfs->szOsFile); |
| 4169 | raw_printf(p->out, "vfs.mxPathname = %d\n", pVfs->mxPathname); |
| 4170 | } |
| 4171 | } |
| 4172 | }else |
| 4173 | |
| 4174 | if( c=='v' && strncmp(azArg[0], "vfslist", n)==0 ){ |
| 4175 | sqlite3_vfs *pVfs; |
| 4176 | sqlite3_vfs *pCurrent = 0; |
| 4177 | if( p->db ){ |
| 4178 | sqlite3_file_control(p->db, "main", SQLITE_FCNTL_VFS_POINTER, &pCurrent); |
| 4179 | } |
| 4180 | for(pVfs=sqlite3_vfs_find(0); pVfs; pVfs=pVfs->pNext){ |
| 4181 | utf8_printf(p->out, "vfs.zName = \"%s\"%s\n", pVfs->zName, |
| 4182 | pVfs==pCurrent ? " <--- CURRENT" : ""); |
| 4183 | raw_printf(p->out, "vfs.iVersion = %d\n", pVfs->iVersion); |
| 4184 | raw_printf(p->out, "vfs.szOsFile = %d\n", pVfs->szOsFile); |
| 4185 | raw_printf(p->out, "vfs.mxPathname = %d\n", pVfs->mxPathname); |
| 4186 | if( pVfs->pNext ){ |
| 4187 | raw_printf(p->out, "-----------------------------------\n"); |
| 4188 | } |
| 4189 | } |
| 4190 | }else |
| 4191 | |
| 4192 | if( c=='v' && strncmp(azArg[0], "vfsname", n)==0 ){ |
| 4193 | const char *zDbName = nArg==2 ? azArg[1] : "main"; |
| 4194 |