aboutsummaryrefslogtreecommitdiff
path: root/arch/um/util/mk_constants_user.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/um/util/mk_constants_user.c')
-rw-r--r--arch/um/util/mk_constants_user.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/arch/um/util/mk_constants_user.c b/arch/um/util/mk_constants_user.c
new file mode 100644
index 00000000000..8f4d7e50be7
--- /dev/null
+++ b/arch/um/util/mk_constants_user.c
@@ -0,0 +1,28 @@
+#include <stdio.h>
+
+void print_head(void)
+{
+ printf("/*\n");
+ printf(" * Generated by mk_constants\n");
+ printf(" */\n");
+ printf("\n");
+ printf("#ifndef __UM_CONSTANTS_H\n");
+ printf("#define __UM_CONSTANTS_H\n");
+ printf("\n");
+}
+
+void print_constant_str(char *name, char *value)
+{
+ printf("#define %s \"%s\"\n", name, value);
+}
+
+void print_constant_int(char *name, int value)
+{
+ printf("#define %s %d\n", name, value);
+}
+
+void print_tail(void)
+{
+ printf("\n");
+ printf("#endif\n");
+}