diff --git a/src/argparse.cpp b/src/argparse.cpp index c1dc151..b66f85e 100644 --- a/src/argparse.cpp +++ b/src/argparse.cpp @@ -9,7 +9,7 @@ void print_help(const char *argv0) "\n\t-e: display some extended info(*) (may slow down the startup)" "\n\t-h: display this help and exit" "\n\t-l: display LEN bytes (only in terminal mode)" - "\n\t-k: print information about the TKeys in the file" + "\n\t-k: print information about the TKeys in the file and exit" "\n\t-n: list the names of the RNTuples found in the file and exit" "\n\t-s: set first displayed byte to START" "\n\t-t: no graphics, output to terminal" diff --git a/src/rntviewer.cpp b/src/rntviewer.cpp index 3a1c98b..bcf3b65 100644 --- a/src/rntviewer.cpp +++ b/src/rntviewer.cpp @@ -176,6 +176,8 @@ int main(int argc, char **argv) } return 0; } + if (args.print_keys_info) + return 0; if (success) app.fdata.rndata = get_rntuple_data(app.fdata.arena, app.inspected_file, app.fdata.tfile_data, args.extended_info); diff --git a/src/tfile.cpp b/src/tfile.cpp index a04c6ad..ba2b4cd 100644 --- a/src/tfile.cpp +++ b/src/tfile.cpp @@ -219,6 +219,9 @@ b8 walk_tkeys(Arena *arena, const u8 *data, u64 data_len, u32 flags, TFile_Data } if (is_free_slot) { + if (flags & WTK_PRINT_KEYS_INFO) { + printf("Free Slot at 0x%lX, len: %d (%s)\n", cur, n_bytes, to_pretty_size(scratch.arena, n_bytes).c()); + } // don't try to read the rest of the data cur += n_bytes; continue;