diff --git a/Makefile.in b/Makefile.in index dcf5a0bf80..9886377a4b 100644 --- a/Makefile.in +++ b/Makefile.in @@ -345,8 +345,8 @@ SRC += \ $(TOP)/ext/rtree/rtree.h \ $(TOP)/ext/rtree/rtree.c SRC += \ - $(TOP)/ext/ota/sqlite3ota.h \ - $(TOP)/ext/ota/sqlite3ota.c + $(TOP)/ext/rbu/sqlite3rbu.h \ + $(TOP)/ext/rbu/sqlite3rbu.c # Generated source code files @@ -404,7 +404,7 @@ TESTSRC = \ $(TOP)/src/test_wsd.c \ $(TOP)/ext/fts3/fts3_term.c \ $(TOP)/ext/fts3/fts3_test.c \ - $(TOP)/ext/ota/test_ota.c + $(TOP)/ext/rbu/test_rbu.c # Statically linked extensions # diff --git a/Makefile.msc b/Makefile.msc index ed6e58e949..bec86b1bc9 100644 --- a/Makefile.msc +++ b/Makefile.msc @@ -1007,8 +1007,8 @@ SRC4 = \ $(TOP)\ext\icu\icu.c \ $(TOP)\ext\rtree\rtree.h \ $(TOP)\ext\rtree\rtree.c \ - $(TOP)\ext\ota\sqlite3ota.h \ - $(TOP)\ext\ota\sqlite3ota.c + $(TOP)\ext\rbu\sqlite3rbu.h \ + $(TOP)\ext\rbu\sqlite3rbu.c # Generated source code files @@ -1069,7 +1069,7 @@ TESTSRC = \ $(TOP)\src\test_wsd.c \ $(TOP)\ext\fts3\fts3_term.c \ $(TOP)\ext\fts3\fts3_test.c \ - $(TOP)\ext\ota\test_ota.c + $(TOP)\ext\rbu\test_rbu.c # Statically linked extensions # diff --git a/ext/ota/ota.c b/ext/rbu/rbu.c similarity index 67% rename from ext/ota/ota.c rename to ext/rbu/rbu.c index fffc1267bd..6e84bbdebe 100644 --- a/ext/ota/ota.c +++ b/ext/rbu/rbu.c @@ -10,11 +10,11 @@ ** ************************************************************************* ** -** This file contains a command-line application that uses the OTA +** This file contains a command-line application that uses the RBU ** extension. See the usage() function below for an explanation. */ -#include "sqlite3ota.h" +#include "sqlite3rbu.h" #include #include #include @@ -24,18 +24,18 @@ */ void usage(const char *zArgv0){ fprintf(stderr, -"Usage: %s [-step NSTEP] TARGET-DB OTA-DB\n" +"Usage: %s [-step NSTEP] TARGET-DB RBU-DB\n" "\n" -" Argument OTA-DB must be an OTA database containing an update suitable for\n" +" Argument RBU-DB must be an RBU database containing an update suitable for\n" " target database TARGET-DB. If NSTEP is set to less than or equal to zero\n" " (the default value), this program attempts to apply the entire update to\n" " the target database.\n" "\n" " If NSTEP is greater than zero, then a maximum of NSTEP calls are made\n" -" to sqlite3ota_step(). If the OTA update has not been completely applied\n" -" after the NSTEP'th call is made, the state is saved in the database OTA-DB\n" -" and the program exits. Subsequent invocations of this (or any other OTA)\n" -" application will use this state to resume applying the OTA update to the\n" +" to sqlite3rbu_step(). If the RBU update has not been completely applied\n" +" after the NSTEP'th call is made, the state is saved in the database RBU-DB\n" +" and the program exits. Subsequent invocations of this (or any other RBU)\n" +" application will use this state to resume applying the RBU update to the\n" " target db.\n" "\n" , zArgv0); @@ -47,8 +47,8 @@ void report_default_vfs(){ fprintf(stdout, "default vfs is \"%s\"\n", pVfs->zName); } -void report_ota_vfs(sqlite3ota *pOta){ - sqlite3 *db = sqlite3ota_db(pOta, 0); +void report_rbu_vfs(sqlite3rbu *pRbu){ + sqlite3 *db = sqlite3rbu_db(pRbu, 0); if( db ){ char *zName = 0; sqlite3_file_control(db, "main", SQLITE_FCNTL_VFSNAME, &zName); @@ -63,16 +63,16 @@ void report_ota_vfs(sqlite3ota *pOta){ int main(int argc, char **argv){ int i; - const char *zTarget; /* Target database to apply OTA to */ - const char *zOta; /* Database containing OTA */ + const char *zTarget; /* Target database to apply RBU to */ + const char *zRbu; /* Database containing RBU */ char *zErrmsg; /* Error message, if any */ - sqlite3ota *pOta; /* OTA handle */ + sqlite3rbu *pRbu; /* RBU handle */ int nStep = 0; /* Maximum number of step() calls */ int rc; sqlite3_int64 nProgress = 0; /* Process command line arguments. Following this block local variables - ** zTarget, zOta and nStep are all set. */ + ** zTarget, zRbu and nStep are all set. */ if( argc==5 ){ int nArg1 = strlen(argv[1]); if( nArg1>5 || nArg1<2 || memcmp("-step", argv[1], nArg1) ) usage(argv[0]); @@ -81,32 +81,32 @@ int main(int argc, char **argv){ usage(argv[0]); } zTarget = argv[argc-2]; - zOta = argv[argc-1]; + zRbu = argv[argc-1]; report_default_vfs(); - /* Open an OTA handle. If nStep is less than or equal to zero, call - ** sqlite3ota_step() until either the OTA has been completely applied + /* Open an RBU handle. If nStep is less than or equal to zero, call + ** sqlite3rbu_step() until either the RBU has been completely applied ** or an error occurs. Or, if nStep is greater than zero, call - ** sqlite3ota_step() a maximum of nStep times. */ - pOta = sqlite3ota_open(zTarget, zOta, 0); - report_ota_vfs(pOta); - for(i=0; (nStep<=0 || i