Skip to content

Commit

Permalink
generate metadata fix
Browse files Browse the repository at this point in the history
  • Loading branch information
rmeena840 committed Aug 8, 2019
1 parent 13c81bf commit 7d150f7
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions misc/record/record-main.c
Expand Up @@ -516,13 +516,20 @@ static const char metadata[] =
"\t\tinteger { size = 32; align = 8; signed = 1; encoding = none; base = 10; } _next_tid;\n"
"\t\tinteger { size = 32; align = 8; signed = 1; encoding = none; base = 10; } _next_prio;\n"
"\t};\n"
"};"
"};\n"
"\n"
;

typedef struct meta {
char metadata[2610];
} __attribute__((__packed__)) meta;

void generate_metadata(){
FILE *file = fopen("metadata","w");
assert( file != NULL );
fwrite( metadata, sizeof( metadata ), 1, file );
meta meta;
memcpy( meta.metadata, metadata, sizeof(meta.metadata) );
fwrite( &meta, sizeof( meta ), 1, file );
fclose( file );
}

Expand Down

0 comments on commit 7d150f7

Please sign in to comment.