Skip to contentSkip to conversation

Remove bashism in lttng-syscalls-generate-headers.sh

PATCH Mathieu Desnoyers 1 participant 1 message May 13, 2013 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): 20130513143318.GA18192@quintessa

Mathieu Desnoyers

author Applied
#1 lore raw
Quoted 4 lines · * Jon Bernard ([email protected]) wrote:

Options to echo are not portable. In particular, the 'echo -e' option is implemented by some shells, including bash, to expand escape sequences. However, dash is one of the other family of shells that instead expands escape sequences by default.

merged into master and stable-2.2 (in preparation for 2.2 final).

Thanks!

Mathieu

Quoted 30 lines

The printf command is portable and much more reliable.

---
 instrumentation/syscalls/lttng-syscalls-generate-headers.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
instrumentation/syscalls/lttng-syscalls-generate-headers.sh +1 -1
index 046dc06..1754ae8 100755
@@ -59,7 +59,7 @@ if [ "$CLASS" = integers ]; then
 
 NRARGS=0
 
-echo -e \
+printf \
 'SC_DECLARE_EVENT_CLASS_NOARGS(syscalls_noargs,\n'\
 '	TP_STRUCT__entry(),\n'\
 '	TP_fast_assign(),\n'\
Signature · 10 lines
1.7.10.4


-- 
Jon

_______________________________________________
lttng-dev mailing list
[email protected]
http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
Signature · 3 lines
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com