diff options
| author | Jim Meyering <meyering@redhat.com> | 2009-08-17 20:44:01 +0200 |
|---|---|---|
| committer | Jim Meyering <meyering@redhat.com> | 2009-08-18 10:06:33 +0200 |
| commit | 9c5f05ec14655195fc94dc7c72d132087abe634b (patch) | |
| tree | e67ddefbba66628f1df9380de61f7861ef2af80d /src | |
| parent | 8966b137660fff6619905e842ef793c4c9ed4f6e (diff) | |
| download | libguestfs-9c5f05ec14655195fc94dc7c72d132087abe634b.tar.gz libguestfs-9c5f05ec14655195fc94dc7c72d132087abe634b.tar.xz libguestfs-9c5f05ec14655195fc94dc7c72d132087abe634b.zip | |
generator.ml: do not emit unused print_* functions
* src/generator.ml: Do not emit functions like print_xattr,
print_lvm_vg, print_inotify_event, that are not used.
Diffstat (limited to 'src')
| -rwxr-xr-x | src/generator.ml | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/generator.ml b/src/generator.ml index 4824438e..08c28fc7 100755 --- a/src/generator.ml +++ b/src/generator.ml @@ -6129,11 +6129,6 @@ and generate_fish_cmds () = ) cols; pr "}\n"; pr "\n"; - pr "static void print_%s (struct guestfs_%s *%s)\n" typ typ typ; - pr "{\n"; - pr " print_%s_indent (%s, \"\");\n" typ typ; - pr "}\n"; - pr "\n"; ) structs; (* Emit a print_TYPE_list function definition only if that function is used. *) @@ -6145,6 +6140,18 @@ and generate_fish_cmds () = | typ, _ -> () (* empty *) ) rstructs_used; + (* Emit a print_TYPE function definition only if that function is used. *) + List.iter ( + function + | typ, RStructOnly -> + pr "static void print_%s (struct guestfs_%s *%s)\n" typ typ typ; + pr "{\n"; + pr " print_%s_indent (%s, \"\");\n" typ typ; + pr "}\n"; + pr "\n"; + | typ, _ -> () (* empty *) + ) rstructs_used; + (* run_<action> actions *) List.iter ( fun (name, style, _, flags, _, _, _) -> |
