[ovs-dev] [PATCH 1/3] ofp-errors: Ignore text enclosed in square brackets
Simon Horman
horms at verge.net.au
Wed Sep 5 02:50:36 UTC 2012
Enhance to extract-ofp-errors to omit text enclosed in square brackets from
error description. This allows some commentary other than
the error description to be supplied in ofp-errors.h
As suggested by Ben Pfaff <blp at nicira.com>
Signed-off-by: Simon Horman <horms at verge.net.au>
---
I chose not to use the alternate suggestion of terminating descriptions
on new line as there are several examples of descriptions that span
multiple lines in ofp-errors.h
v2
* Initial post
---
build-aux/extract-ofp-errors | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/build-aux/extract-ofp-errors b/build-aux/extract-ofp-errors
index e513b7f..bd4ab9e 100755
--- a/build-aux/extract-ofp-errors
+++ b/build-aux/extract-ofp-errors
@@ -207,7 +207,7 @@ def extract_ofp_errors(filenames):
enum = m.group(1)
- comments.append(comment)
+ comments.append(re.sub('\[[^]]*\]', '', comment))
names.append(enum)
for dst in dsts.split(', '):
--
1.7.10.4
More information about the dev
mailing list