diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2010-11-17 15:54:06 +0000 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2010-11-17 15:54:06 +0000 |
commit | a5884a88fc57174c43d2ae9b50b437a60f6baf0b (patch) | |
tree | 4efc70349140b0410220ff11da4d95425eee2380 /generator | |
parent | 5067f8fc779837385c6ce4a41e60420ffa52bbe9 (diff) | |
download | libguestfs-a5884a88fc57174c43d2ae9b50b437a60f6baf0b.tar.gz libguestfs-a5884a88fc57174c43d2ae9b50b437a60f6baf0b.tar.xz libguestfs-a5884a88fc57174c43d2ae9b50b437a60f6baf0b.zip |
generator: Make trace flag an explicit variable.
This is just code motion.
Diffstat (limited to 'generator')
-rw-r--r-- | generator/generator_c.ml | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/generator/generator_c.ml b/generator/generator_c.ml index 0194e0cb..658d76d9 100644 --- a/generator/generator_c.ml +++ b/generator/generator_c.ml @@ -712,7 +712,7 @@ check_state (guestfs_h *g, const char *caller) (* Generate code to generate guestfish call traces. *) let trace_call shortname (ret, args, optargs) = - pr " if (guestfs__get_trace (g)) {\n"; + pr " if (trace_flag) {\n"; let needs_i = List.exists (function @@ -802,6 +802,8 @@ check_state (guestfs_h *g, const char *caller) ~handle:"g" ~prefix:"guestfs_" ~suffix:"_argv" ~optarg_proto:Argv shortname style; pr "{\n"; + pr " int trace_flag = g->trace;\n"; + pr "\n"; check_null_strings shortname style; reject_unknown_optargs shortname style; trace_call shortname style; @@ -852,6 +854,7 @@ check_state (guestfs_h *g, const char *caller) pr " int serial;\n"; pr " int r;\n"; + pr " int trace_flag = g->trace;\n"; pr "\n"; check_null_strings shortname style; reject_unknown_optargs shortname style; |