diff options
author | Howard Chu <hyc@symas.com> | 2017-08-12 12:21:25 +0100 |
---|---|---|
committer | Howard Chu <hyc@symas.com> | 2017-08-12 12:21:25 +0100 |
commit | 9c6eb75c656363176a55c63c81803feb3cfa614d (patch) | |
tree | b46956d659a9047b4d0730081fff4ca3cd6c3ca8 /external/db_drivers/liblmdb/mdb_copy.c | |
parent | Merge pull request #2263 (diff) | |
download | monero-9c6eb75c656363176a55c63c81803feb3cfa614d.tar.xz |
ITS#8704 add MDB_PREVSNAPSHOT flag to mdb_env_open
used to open the previous snapshot, in case the latest one
is corrupted
Diffstat (limited to 'external/db_drivers/liblmdb/mdb_copy.c')
-rw-r--r-- | external/db_drivers/liblmdb/mdb_copy.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/external/db_drivers/liblmdb/mdb_copy.c b/external/db_drivers/liblmdb/mdb_copy.c index f37ccbcc2..95a6e7130 100644 --- a/external/db_drivers/liblmdb/mdb_copy.c +++ b/external/db_drivers/liblmdb/mdb_copy.c @@ -38,6 +38,8 @@ int main(int argc,char * argv[]) for (; argc > 1 && argv[1][0] == '-'; argc--, argv++) { if (argv[1][1] == 'n' && argv[1][2] == '\0') flags |= MDB_NOSUBDIR; + else if (argv[1][1] == 'v' && argv[1][2] == '\0') + flags |= MDB_PREVSNAPSHOT; else if (argv[1][1] == 'c' && argv[1][2] == '\0') cpflags |= MDB_CP_COMPACT; else if (argv[1][1] == 'V' && argv[1][2] == '\0') { @@ -48,7 +50,7 @@ int main(int argc,char * argv[]) } if (argc<2 || argc>3) { - fprintf(stderr, "usage: %s [-V] [-c] [-n] srcpath [dstpath]\n", progname); + fprintf(stderr, "usage: %s [-V] [-c] [-n] [-v] srcpath [dstpath]\n", progname); exit(EXIT_FAILURE); } |