kvm: external module: add version string
[qemu-kvm/fedora.git] / kvm / kernel / hack-module.awk
blobe609f691397c363440d246132bf3e60a670695a5
2 /^static __init int kvm_init\(/ { anon_inodes = 1 }
4 /return 0;/ && anon_inodes {
5 print "\tr = kvm_init_anon_inodes();";
6 print "\tif (r) {";
7 print "\t\t__free_page(bad_page);";
8 print "\t\tgoto out;";
9 print "\t}";
10 anon_inodes = 0
13 /^static __exit void kvm_exit/ { anon_inodes_exit = 1 }
15 /\}/ && anon_inodes_exit {
16 print "\tkvm_exit_anon_inodes();";
17 anon_inodes_exit = 0
20 /kmem_cache_create/ { kmem_cache_create = 1 }
22 /NULL\)/ && kmem_cache_create {
23 sub(/NULL\)/, "KMEM_CACHE_CREATE_CTOR_DTOR)");
24 kmem_cache_create = 0
27 /MODULE_AUTHOR/ {
28 printf("MODULE_INFO(version, \"%s\");\n", version)
31 { print }