From ea10cc26013da74a15e3cec97b36b437fb84a207 Mon Sep 17 00:00:00 2001 From: Gerard Wagener Date: Fri, 8 Feb 2019 16:38:07 +0100 Subject: [PATCH] build analyzer key --- bin/pibs.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/bin/pibs.c b/bin/pibs.c index 1321546..8c9bf65 100644 --- a/bin/pibs.c +++ b/bin/pibs.c @@ -44,6 +44,7 @@ #define NBINITEMS 255 //Number of items per bin #define SZBIN 4 #define SZUUID 40 +#define SZKEY 1024 #define NBINSCALE 2 // Scaling factor of the entire datastructure #define HDBG(...) if (HASHDEBUG) fprintf(stderr, __VA_ARGS__) @@ -80,6 +81,7 @@ typedef struct pibs_s { int errno_pibs; char *filename; char *uuid; + char *key; int should_dump_table; int show_backscatter; int show_stats; @@ -338,6 +340,7 @@ pibs_t* init(void) pibs->data = calloc(pibs->data_size,1); pibs->filename = calloc(FILENAME_MAX,1); pibs->uuid = calloc(SZUUID,1); + pibs->key = calloc(SZKEY,1); printf("#Internal look up structure size in bytes: %ld\n", pibs->data_size); // Build header pibs->data[0]='P'; @@ -461,6 +464,10 @@ int main(int argc, char* argv[]) return EXIT_FAILURE; } } + if (pibs->uuid[0]) { + snprintf(pibs->key, SZKEY, "analyzer:1:%s",pibs->uuid); + printf("key: %s\n", pibs->key); + } if (pibs->filename[0]) { process_file(pibs); }