X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=build-aux%2Fcheck-structs;h=152c6a21426d3d23137abdc7bd81a749cf78711b;hb=09eda55c4a3ef0215fea797c73cc2ba5778af8ca;hp=545c80a89543135498dc45f58b2969b1a93f0b18;hpb=a4af00400a835eb87569ba40e21874c05e872c0f;p=openvswitch diff --git a/build-aux/check-structs b/build-aux/check-structs index 545c80a8..152c6a21 100755 --- a/build-aux/check-structs +++ b/build-aux/check-structs @@ -1,5 +1,6 @@ #! /usr/bin/python +import os.path import sys import re @@ -13,6 +14,10 @@ types['uint8_t'] = {"size": 1, "alignment": 1} types['uint16_t'] = {"size": 2, "alignment": 2} types['uint32_t'] = {"size": 4, "alignment": 4} types['uint64_t'] = {"size": 8, "alignment": 8} +types['ovs_be16'] = {"size": 2, "alignment": 2} +types['ovs_be32'] = {"size": 4, "alignment": 4} +types['ovs_be64'] = {"size": 8, "alignment": 8} +types['ovs_32aligned_be64'] = {"size": 8, "alignment": 4} token = None line = "" @@ -190,10 +195,7 @@ def checkStructs(): sys.exit(1) if '--help' in sys.argv: - argv0 = sys.argv[0] - slash = argv0.rfind('/') - if slash: - argv0 = argv0[slash + 1:] + argv0 = os.path.basename(sys.argv[0]) print '''\ %(argv0)s, for checking struct and struct member alignment usage: %(argv0)s HEADER [HEADER]...