* [PATCH rdma-core] ibdiag: Remove wrongly added ibtypes.py file
@ 2019-09-24 8:18 Leon Romanovsky
0 siblings, 0 replies; only message in thread
From: Leon Romanovsky @ 2019-09-24 8:18 UTC (permalink / raw)
To: Doug Ledford, Jason Gunthorpe; +Cc: Leon Romanovsky, RDMA mailing list
From: Leon Romanovsky <leonro@mellanox.com>
ibtypes.py was not supposed to be added from the beginning, hence remove it.
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
---
ibtypes.py | 61 ------------------------------------------------------
1 file changed, 61 deletions(-)
delete mode 100644 ibtypes.py
diff --git a/ibtypes.py b/ibtypes.py
deleted file mode 100644
index 119a023e5..000000000
--- a/ibtypes.py
+++ /dev/null
@@ -1,61 +0,0 @@
-import re
-import sys
-
-def global_ln(ln):
- g = re.match(r"^#define\s+(\S+)\s+CL_HTON(\d+)\((.*)\)",ln)
- if g:
- print("#define %s htobe%s(%s)"%(g.group(1),g.group(2),g.group(3)))
- return global_ln
- g = re.match(r"^#define\s+(\S+)\s+\(CL_HTON(\d+)\((.*)\)\)",ln)
- if g:
- print("#define %s htobe%s(%s)"%(g.group(1),g.group(2),g.group(3)))
- return global_ln
- g = re.match(r"^#define\s+(\S+)\s+(0x\w+)",ln)
- if g:
- print("#define %s %s"%(g.group(1),g.group(2)))
- return global_ln
- g = re.match(r"^#define\s+(\S+)\s+\((0x\w+)\)",ln)
- if g:
- print("#define %s %s"%(g.group(1),g.group(2)))
- return global_ln
- g = re.match(r"^#define\s+(\S+)\s+(\d+)",ln)
- if g:
- print("#define %s %s"%(g.group(1),g.group(2)))
- return global_ln
- g = re.match(r"^#define\s+(\S+)\s+\((\d+)\)",ln)
- if g:
- print("#define %s %s"%(g.group(1),g.group(2)))
- return global_ln
-
- g = re.match(r"^typedef\s+(union|struct)\s+_\S+\s+{",ln);
- if g:
- print("typedef %s {"%(g.group(1)));
- return in_struct;
-
- print(ln,file=FO);
- return global_ln
-
-def in_struct(ln):
- g = re.match(r"^}\s+PACK_SUFFIX\s+(\S+);",ln);
- if g:
- print("} __attribute__((packed)) %s;"%(g.group(1)));
- return global_ln;
- g = re.match(r"^}\s+(\S+);",ln);
- if g:
- print("} %s;"%(g.group(1)));
- return global_ln;
-
- ln = ln.replace("PACK_SUFFIX","__attribute__((packed))");
- ln = ln.replace("ib_gid_prefix_t","__be64");
- ln = ln.replace("ib_net64_t","__be64");
- ln = ln.replace("ib_net32_t","__be32");
- ln = ln.replace("ib_net16_t","__be16");
- ln = ln.replace("boolean_t","bool");
- print(ln)
- return in_struct;
-
-mode = global_ln
-with open(sys.argv[1]) as FI, open(sys.argv[2],"wt") as FO:
- for ln in FI:
- ln = ln.rstrip();
- mode = mode(ln);
--
2.20.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2019-09-24 8:18 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-09-24 8:18 [PATCH rdma-core] ibdiag: Remove wrongly added ibtypes.py file Leon Romanovsky
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.