projects
/
lttng-ust.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add mutex for channel wakeup fd update
[lttng-ust.git]
/
tools
/
lttng-gen-tp
diff --git
a/tools/lttng-gen-tp
b/tools/lttng-gen-tp
index 03a85fcb4e6a7cb63e8172cce6f6bc8f03db1d27..2f468cbb79abde4fbf580208cc4728df91af548a 100755
(executable)
--- a/
tools/lttng-gen-tp
+++ b/
tools/lttng-gen-tp
@@
-31,12
+31,12
@@
class HeaderFile:
#undef TRACEPOINT_PROVIDER
#define TRACEPOINT_PROVIDER {providerName}
#undef TRACEPOINT_PROVIDER
#define TRACEPOINT_PROVIDER {providerName}
-#undef TRACEPOINT_INCLUDE
_FILE
-#define TRACEPOINT_INCLUDE
_FILE ./{headerFilename}
+#undef TRACEPOINT_INCLUDE
+#define TRACEPOINT_INCLUDE
"./{headerFilename}"
#ifdef __cplusplus
#ifdef __cplusplus
-
#
extern "C"{{
-#endif /*__cplusplus */
+extern "C"{{
+#endif /*
__cplusplus */
#if !defined({includeGuard}) || defined(TRACEPOINT_HEADER_MULTI_READ)
#if !defined({includeGuard}) || defined(TRACEPOINT_HEADER_MULTI_READ)
@@
-52,7
+52,7
@@
class HeaderFile:
#ifdef __cplusplus
}}
#ifdef __cplusplus
}}
-#endif /*__cplusplus */
+#endif /*
__cplusplus */
"""
def __init__(self, filename, template):
"""
def __init__(self, filename, template):
@@
-61,7
+61,7
@@
class HeaderFile:
def write(self):
outputFile = open(self.outputFilename,"w")
def write(self):
outputFile = open(self.outputFilename,"w")
- includeGuard =
"_"+
self.outputFilename.upper().replace(".","_")
+ includeGuard = self.outputFilename.upper().replace(".","_")
outputFile.write(HeaderFile.HEADER_TPL.format(providerName=self.template.domain,
includeGuard = includeGuard,
outputFile.write(HeaderFile.HEADER_TPL.format(providerName=self.template.domain,
includeGuard = includeGuard,
@@
-207,8
+207,6
@@
def main(argv=None):
opts, args = getopt.gnu_getopt(argv[1:], "ho:a", ["help"])
except getopt.error, msg:
raise Usage(msg)
opts, args = getopt.gnu_getopt(argv[1:], "ho:a", ["help"])
except getopt.error, msg:
raise Usage(msg)
- if len(args) == 0:
- raise Usage("No template file given")
except Usage, err:
print >>sys.stderr, err.msg
except Usage, err:
print >>sys.stderr, err.msg
@@
-224,6
+222,14
@@
def main(argv=None):
outputNames.append(a)
if o in ("-a",""):
all = True
outputNames.append(a)
if o in ("-a",""):
all = True
+ try:
+ if len(args) == 0:
+ raise Usage("No template file given")
+
+ except Usage, err:
+ print >>sys.stderr, err.msg
+ print >>sys.stderr, "for help use --help"
+ return 2
doCFile = None
doHeader = None
doCFile = None
doHeader = None
@@
-257,6
+263,9
@@
def main(argv=None):
# process arguments
for arg in args:
# process arguments
for arg in args:
+ if arg[-3:] != ".tp":
+ print arg + " does not end in .tp. Skipping."
+ continue
tpl = None
try:
tpl = None
try:
This page took
0.025465 seconds
and
4
git commands to generate.