ctdb: add a couple of flags to control output of ctdb catdb
authorMichael Adam <obnox@samba.org>
Wed, 22 Dec 2010 10:58:43 +0000 (11:58 +0100)
committerStefan Metzmacher <metze@samba.org>
Mon, 18 Apr 2011 16:44:10 +0000 (18:44 +0200)
  --print-datasize         do not print record data in catdb, only data size
  --print-recordflags      print the record flags in catdb
  --print-lmaster          print the record's lmaster in catdb
  --print-hash             print the record's hash in catdb
  --print-recordflags      print the records flags in catdb
  --print-emptyrecords     also print the empty records in catdb

tools/ctdb.c

index 09c849cdd58d25612b5593fd37a26f556ab37c04..6e5396461bebc1e21c7501004513d6bc81493198 100644 (file)
@@ -42,6 +42,11 @@ static struct {
        uint32_t pnn;
        int machinereadable;
        int maxruntime;
+       int printdatasize;
+       int printrecordflags;
+       int printlmaster;
+       int printhash;
+       int printemptyrecords;
 } options;
 
 #define TIMELIMIT() timeval_current_ofs(options.timelimit, 0)
@@ -4456,6 +4461,12 @@ int main(int argc, const char *argv[])
                { "node",      'n', POPT_ARG_STRING, &nodestring, 0, "node", "integer|all" },
                { "machinereadable", 'Y', POPT_ARG_NONE, &options.machinereadable, 0, "enable machinereadable output", NULL },
                { "maxruntime", 'T', POPT_ARG_INT, &options.maxruntime, 0, "die if runtime exceeds this limit (in seconds)", "integer" },
+               { "print-datasize", 0, POPT_ARG_NONE, &options.printdatasize, 0, "do not print record data in catdb, only data size", NULL },
+               { "print-recordflags", 0, POPT_ARG_NONE, &options.printrecordflags, 0, "print the record flags in catdb", NULL },
+               { "print-lmaster", 0, POPT_ARG_NONE, &options.printlmaster, 0, "print the record's lmaster in catdb", NULL },
+               { "print-hash", 0, POPT_ARG_NONE, &options.printhash, 0, "print the record's hash in catdb", NULL },
+               { "print-recordflags", 0, POPT_ARG_NONE, &options.printrecordflags, 0, "print the records flags in catdb", NULL },
+               { "print-emptyrecords", 0, POPT_ARG_NONE, &options.printemptyrecords, 0, "also print the empty records in catdb", NULL },
                POPT_TABLEEND
        };
        int opt;