Fix: generate header missing echo -e for escape chars
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 17 Apr 2012 14:50:12 +0000 (10:50 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 17 Apr 2012 14:52:48 +0000 (10:52 -0400)
"why is the -e needed ? What was the experienced oddness ?"

   The \n wasn't getting evaluated to a newline and was being inserted
into the header file as '\n'

   From man echo(1):

       If -e is in effect, the following sequences are recognized:

       \\     backslash

       \a     alert (BEL)

       \b     backspace

       \c     produce no further output

       \e     escape

       \f     form feed

       \n     new line

       \r     carriage return

       \t     horizontal tab

       \v     vertical tab

Suggested-by: Ryan Kyser <Ryan.Kyser@jci.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
instrumentation/syscalls/lttng-syscalls-generate-headers.sh

index 5eddb2746801eb38612eb7e9452e677a2c36ae4e..046dc0676e390d55575e5d50b0e4fae5fd91bbd6 100644 (file)
@@ -59,7 +59,7 @@ if [ "$CLASS" = integers ]; then
 
 NRARGS=0
 
-echo \
+echo -e \
 'SC_DECLARE_EVENT_CLASS_NOARGS(syscalls_noargs,\n'\
 '      TP_STRUCT__entry(),\n'\
 '      TP_fast_assign(),\n'\
This page took 0.028428 seconds and 4 git commands to generate.