Skip to content

Commit

Permalink
Apply Pi-hole specific patches
Browse files Browse the repository at this point in the history
Signed-off-by: DL6ER <[email protected]>
  • Loading branch information
DL6ER committed May 18, 2023
1 parent b66f7f1 commit c336434
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
5 changes: 4 additions & 1 deletion src/database/shell.c
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@ typedef unsigned char u8;
#endif
#include <ctype.h>
#include <stdarg.h>
// print_FTL_version()
#include "../log.h"

#if !defined(_WIN32) && !defined(WIN32)
# include <signal.h>
Expand Down Expand Up @@ -27271,7 +27273,7 @@ static void sayAbnormalExit(void){
#endif

#if SQLITE_SHELL_IS_UTF8
int SQLITE_CDECL main(int argc, char **argv){
int SQLITE_CDECL sqlite3_shell_main(int argc, char **argv){
#else
int SQLITE_CDECL wmain(int argc, wchar_t **wargv){
char **argv;
Expand Down Expand Up @@ -27829,6 +27831,7 @@ int SQLITE_CDECL wmain(int argc, wchar_t **wargv){
char *zHome;
char *zHistory;
int nHistory;
print_FTL_version();
printf(
"SQLite version %s %.19s\n" /*extra-version-info*/
"Enter \".help\" for usage hints.\n",
Expand Down
4 changes: 1 addition & 3 deletions src/database/sqlite3.c
Original file line number Diff line number Diff line change
Expand Up @@ -176379,8 +176379,7 @@ SQLITE_PRIVATE void sqlite3RollbackAll(sqlite3 *db, int tripCode){
** Return a static string containing the name corresponding to the error code
** specified in the argument.
*/
#if defined(SQLITE_NEED_ERR_NAME)
SQLITE_PRIVATE const char *sqlite3ErrName(int rc){
SQLITE_API const char *sqlite3ErrName(int rc){
const char *zName = 0;
int i, origRc = rc;
for(i=0; i<2 && zName==0; i++, rc &= 0xff){
Expand Down Expand Up @@ -176486,7 +176485,6 @@ SQLITE_PRIVATE const char *sqlite3ErrName(int rc){
}
return zName;
}
#endif

/*
** Return a static string that describes the kind of error specified in the
Expand Down
2 changes: 1 addition & 1 deletion test/test_suite.bats
Original file line number Diff line number Diff line change
Expand Up @@ -1356,7 +1356,7 @@
@test "Embedded SQLite3 shell available and functional" {
run bash -c './pihole-FTL sqlite3 -help'
printf "%s\n" "${lines[@]}"
[[ ${lines[0]} == "Usage: sqlite3 [OPTIONS] FILENAME [SQL]" ]]
[[ ${lines[0]} == "Usage: sqlite3 [OPTIONS] [FILENAME [SQL]]" ]]
}

@test "Embedded SQLite3 shell is called for .db file" {
Expand Down

0 comments on commit c336434

Please sign in to comment.