summaryrefslogtreecommitdiffstats
path: root/testutil/get-section-fraction.c
blob: cdb15307e85a207e7d3ad9ed384d410c81fe3d12 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/* See LICENSE file for copyright and license details. */
#include "../libsyscalls.h"

#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>


int
main(int argc, char *argv[])
{
	enum libsyscalls_datatype_section sec;

	(void) argc;

	sec = (enum libsyscalls_datatype_section)atoi(argv[1]);
	printf("%u\n", LIBSYSCALLS_GET_SECTION_FRACTION(sec));

	if (fflush(stdout) || fclose(stdout)) {
		perror(NULL);
		return 1;
	}
	return 0;
}