File: piegen.h

package info (click to toggle)
criu 4.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 11,584 kB
  • sloc: ansic: 139,280; python: 7,484; sh: 3,824; java: 2,799; makefile: 2,659; asm: 1,137; perl: 206; xml: 117; exp: 45
file content (28 lines) | stat: -rw-r--r-- 595 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#ifndef COMPEL_PIEGEN_H__
#define COMPEL_PIEGEN_H__

#include <stdio.h>
#include <unistd.h>

#include <elf.h>

#include "common/compiler.h"

typedef struct {
	char *input_filename;
	char *output_filename;
	char *prefix;
	FILE *fout;
} piegen_opt_t;

extern piegen_opt_t opts;

#define pr_out(fmt, ...)                                        \
	do {                                                    \
		if (opts.fout)                                  \
			fprintf(opts.fout, fmt, ##__VA_ARGS__); \
	} while (0)

extern int handle_binary(void *mem, size_t size);

#endif /* COMPEL_PIEGEN_H__ */