diff options
author | dfr <dfr@FreeBSD.org> | 2008-11-22 16:14:52 +0000 |
---|---|---|
committer | dfr <dfr@FreeBSD.org> | 2008-11-22 16:14:52 +0000 |
commit | 19b6af98ec71398e77874582eb84ec5310c7156f (patch) | |
tree | 61eebb1b357f3edaa339d295e26a47a74534ac23 /sys/xen/interface/foreign/mkchecker.py | |
parent | 83299de5870b2dc099c17aec548d3502821bc29b (diff) | |
download | FreeBSD-src-19b6af98ec71398e77874582eb84ec5310c7156f.zip FreeBSD-src-19b6af98ec71398e77874582eb84ec5310c7156f.tar.gz |
Clone Kip's Xen on stable/6 tree so that I can work on improving FreeBSD/amd64
performance in Xen's HVM mode.
Diffstat (limited to 'sys/xen/interface/foreign/mkchecker.py')
-rw-r--r-- | sys/xen/interface/foreign/mkchecker.py | 58 |
1 files changed, 0 insertions, 58 deletions
diff --git a/sys/xen/interface/foreign/mkchecker.py b/sys/xen/interface/foreign/mkchecker.py deleted file mode 100644 index 9da1e2b..0000000 --- a/sys/xen/interface/foreign/mkchecker.py +++ /dev/null @@ -1,58 +0,0 @@ -#!/usr/bin/python - -import sys; -from structs import structs; - -# command line arguments -arch = sys.argv[1]; -outfile = sys.argv[2]; -archs = sys.argv[3:]; - -f = open(outfile, "w"); -f.write(''' -/* - * sanity checks for generated foreign headers: - * - verify struct sizes - * - * generated by %s -- DO NOT EDIT - */ -#include <stdio.h> -#include <stdlib.h> -#include <stddef.h> -#include <inttypes.h> -#include "../xen.h" -'''); - -for a in archs: - f.write('#include "%s.h"\n' % a); - -f.write('int main(int argc, char *argv[])\n{\n'); - -f.write('\tprintf("\\n");'); -f.write('printf("%-25s |", "structs");\n'); -for a in archs: - f.write('\tprintf("%%8s", "%s");\n' % a); -f.write('\tprintf("\\n");'); - -f.write('\tprintf("\\n");'); -for struct in structs: - f.write('\tprintf("%%-25s |", "%s");\n' % struct); - for a in archs: - if a == arch: - s = struct; # native - else: - s = struct + "_" + a; - f.write('#ifdef %s_has_no_%s\n' % (a, struct)); - f.write('\tprintf("%8s", "-");\n'); - f.write("#else\n"); - f.write('\tprintf("%%8zd", sizeof(struct %s));\n' % s); - f.write("#endif\n"); - - f.write('\tprintf("\\n");\n\n'); - -f.write('\tprintf("\\n");\n'); -f.write('\texit(0);\n'); -f.write('}\n'); - -f.close(); - |