Skip to contentSkip to conversation

platform/chrome: cros_ec_trace: update generating script

PATCH Superseded Tzung-Bi Shih 1 participant 1 message Jul 23, 2019

Subsystems (2)

v1 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 platform/chrome: cros_ec_trace: update generating script

To remove ", \" from the last line.

---
 drivers/platform/chrome/cros_ec_trace.c | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)
drivers/platform/chrome/cros_ec_trace.c +17 -1
index 0a76412095a9..9b6aba22441f 100644
@@ -6,7 +6,23 @@
 #define TRACE_SYMBOL(a) {a, #a}
 
 // Generate the list using the following script:
-// sed -n 's/^#define \(EC_CMD_[[:alnum:]_]*\)\s.*/\tTRACE_SYMBOL(\1), \\/p' include/linux/mfd/cros_ec_commands.h
+// sed -n 's/^#define \(EC_CMD_[[:alnum:]_]*\)\s.*/\tTRACE_SYMBOL(\1), \\/p' \
+// include/linux/mfd/cros_ec_commands.h | awk '
+// BEGIN {
+//   on = 0;
+// }
+// {
+//   if (on)
+//     print buf;
+//   else
+//     on = 1;
+//   buf = $0;
+// }
+// END {
+//   gsub(/, \\/, "", buf);
+//   print buf;
+// }
+// '
 #define EC_CMDS \
 	TRACE_SYMBOL(EC_CMD_PROTO_VERSION), \
 	TRACE_SYMBOL(EC_CMD_HELLO), \
Signature · 1 line
2.22.0.657.g960e92d24f-goog