summaryrefslogtreecommitdiffstats
path: root/sys/tools
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2011-11-09 11:00:29 +0000
committered <ed@FreeBSD.org>2011-11-09 11:00:29 +0000
commit3d017846c9b9a3681c2b59f1d5e29e7a9fb720bd (patch)
tree1d8f18549621366a6628cc8a898c1fa3da6acf9d /sys/tools
parent228e76462a9e37c3161cc04bfc607af4aa4b132f (diff)
downloadFreeBSD-src-3d017846c9b9a3681c2b59f1d5e29e7a9fb720bd.zip
FreeBSD-src-3d017846c9b9a3681c2b59f1d5e29e7a9fb720bd.tar.gz
Simplify the code emitted by makeobjops.awk slightly.
Just place the default kobj_method inside the kobjop_desc structure. There's no need to give these kobj_methods their own symbol. This shaves off 10 KB of a GENERIC kernel binary.
Diffstat (limited to 'sys/tools')
-rw-r--r--sys/tools/makeobjops.awk7
1 files changed, 1 insertions, 6 deletions
diff --git a/sys/tools/makeobjops.awk b/sys/tools/makeobjops.awk
index 4e3bd04..34f2b09 100644
--- a/sys/tools/makeobjops.awk
+++ b/sys/tools/makeobjops.awk
@@ -306,13 +306,8 @@ function handle_method (static, doc)
printh(format_line(prototype argument_list ");",
line_width, length(prototype)));
- # Print out the method desc
- printc("static const struct kobj_method " mname "_method_default = {");
- printc("\t&" mname "_desc, (kobjop_t) " default_function);
- printc("};\n");
-
printc("struct kobjop_desc " mname "_desc = {");
- printc("\t0, &" mname "_method_default");
+ printc("\t0, { &" mname "_desc, (kobjop_t)" default_function " }");
printc("};\n");
# Print out the method itself
OpenPOWER on IntegriCloud