AOF check utility: ability to check files with RDB preamble.

This commit is contained in:
antirez
2017-07-10 13:38:23 +02:00
parent 6b0670daad
commit fc7ecd8d35
6 changed files with 61 additions and 35 deletions

View File

@ -3711,11 +3711,13 @@ int main(int argc, char **argv) {
initSentinel();
}
/* Check if we need to start in redis-check-rdb mode. We just execute
/* Check if we need to start in redis-check-rdb/aof mode. We just execute
* the program main. However the program is part of the Redis executable
* so that we can easily execute an RDB check on loading errors. */
if (strstr(argv[0],"redis-check-rdb") != NULL)
redis_check_rdb_main(argc,argv);
redis_check_rdb_main(argc,argv,NULL);
else if (strstr(argv[0],"redis-check-aof") != NULL)
redis_check_aof_main(argc,argv);
if (argc >= 2) {
j = 1; /* First option to parse in argv[] */