summaryrefslogtreecommitdiffstats
path: root/testutil/get-section-fraction.c
diff options
context:
space:
mode:
Diffstat (limited to 'testutil/get-section-fraction.c')
-rw-r--r--testutil/get-section-fraction.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/testutil/get-section-fraction.c b/testutil/get-section-fraction.c
new file mode 100644
index 0000000..cdb1530
--- /dev/null
+++ b/testutil/get-section-fraction.c
@@ -0,0 +1,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;
+}