fix a kmap leak in virtio_console
[linux/fpc-iii.git] / tools / perf / util / generate-cmdlist.sh
blob36a885d2cd22d12ed004177f375bcaf4aac86a28
1 #!/bin/sh
3 echo "/* Automatically generated by $0 */
4 struct cmdname_help
6 char name[16];
7 char help[80];
8 };
10 static struct cmdname_help common_cmds[] = {"
12 sed -n -e 's/^perf-\([^ ]*\)[ ].* common.*/\1/p' command-list.txt |
13 sort |
14 while read cmd
16 sed -n '
17 /^NAME/,/perf-'"$cmd"'/H
20 s/.*perf-'"$cmd"' - \(.*\)/ {"'"$cmd"'", "\1"},/
22 }' "Documentation/perf-$cmd.txt"
23 done
25 echo "#ifdef HAVE_LIBELF_SUPPORT"
26 sed -n -e 's/^perf-\([^ ]*\)[ ].* full.*/\1/p' command-list.txt |
27 sort |
28 while read cmd
30 sed -n '
31 /^NAME/,/perf-'"$cmd"'/H
34 s/.*perf-'"$cmd"' - \(.*\)/ {"'"$cmd"'", "\1"},/
36 }' "Documentation/perf-$cmd.txt"
37 done
38 echo "#endif /* HAVE_LIBELF_SUPPORT */"
39 echo "};"