Permalink
Browse files

A few more AUX info fields added to RDB.

  • Loading branch information...
antirez committed Jan 8, 2015
1 parent 206cd21 commit 4c0e8923a6cb376c7b2a53fa76ae95f74610285c
Showing with 5 additions and 0 deletions.
  1. +5 −0 src/rdb.c
View
@@ -705,8 +705,13 @@ int rdbSaveAuxFieldStrInt(rio *rdb, char *key, long long val) {
/* Save a few default AUX fields with information about the RDB generated. */
int rdbSaveInfoAuxFields(rio *rdb) {
int redis_bits = (sizeof(void*) == 8) ? 64 : 32;
/* Add a few fiels about the state when the RDB was created. */

This comment has been minimized.

Show comment
Hide comment
@badboy

badboy Jan 8, 2015

Contributor

s/fiels/fields/

@badboy

badboy Jan 8, 2015

Contributor

s/fiels/fields/

if (rdbSaveAuxFieldStrStr(rdb,"redis-ver",REDIS_VERSION) == -1) return -1;
if (rdbSaveAuxFieldStrInt(rdb,"redis-bits",redis_bits) == -1) return -1;
if (rdbSaveAuxFieldStrInt(rdb,"ctime",time(NULL)) == -1) return -1;
if (rdbSaveAuxFieldStrInt(rdb,"used-mem",zmalloc_used_memory()) == -1) return -1;
return 1;
}

0 comments on commit 4c0e892

Please sign in to comment.