search for: needs_i

Displaying 16 results from an estimated 16 matches for "needs_i".

2016 Feb 24
3
[PATCH 1/3] src: generate code for printing contents of structs
...+ pr "\ +#include <config.h> + +#include <inttypes.h> + +#include \"c-ctype.h\" + +#include \"guestfs.h\" +#include \"structs-print.h\" + +"; + + let write_structs = + List.iter ( + fun { s_name = typ; s_cols = cols } -> + let needs_i = + List.exists (function (_, (FUUID|FBuffer)) -> true | _ -> false) cols in + + pr "void\n"; + pr "guestfs_int_print_%s_indent (struct guestfs_%s *%s, FILE *dest, const char *linesep, const char *indent)\n" + typ typ typ; + pr "...
2016 Feb 24
0
[PATCH 3/3] src: print contents of structs and struct lists on tracing
...,7 @@ and generate_client_actions hash () = #include \"guestfs-internal-actions.h\" #include \"guestfs_protocol.h\" #include \"errnostring.h\" +#include \"structs-print.h\" "; @@ -1623,7 +1624,7 @@ and generate_client_actions hash () = let needs_i = match ret with - | RStringList _ | RHashtable _ -> true + | RStringList _ | RHashtable _ | RStructList _ -> true | _ -> false in if needs_i then ( pr "%s size_t i;\n" indent; @@ -1656,15 +1657,25 @@ and generate_client_actions hash () =...
2009 Sep 24
1
[PATCH libguestfs] maint: use spaces, not TABs for indentation
...ro|r" => \$readonly, ) or pod2usage (2); pod2usage (1) if $help; if ($version) { diff --git a/src/generator.ml b/src/generator.ml index 1dd8b20..6f77e4b 100755 --- a/src/generator.ml +++ b/src/generator.ml @@ -4674,8 +4674,8 @@ check_state (guestfs_h *g, const char *caller) let needs_i = List.exists (function - | StringList _ | DeviceList _ -> true - | _ -> false) (snd style) in + | StringList _ | DeviceList _ -> true + | _ -> false) (snd style) in if needs_i then ( pr " int i;\n"; pr &...
2009 Sep 09
2
[PATCH] Add command trace functionality
...emon_functions are any functions which cause some action @@ -4630,6 +4656,52 @@ check_state (guestfs_h *g, const char *caller) "; + (* Generate code to generate guestfish call traces. *) + let trace_call shortname style = + pr " if (guestfs__get_trace (g)) {\n"; + + let needs_i = + List.exists (function + | StringList _ | DeviceList _ -> true + | _ -> false) (snd style) in + if needs_i then ( + pr " int i;\n"; + pr "\n" + ); + + pr " printf (\"%%s\", \"%s\");\n" shortname; + L...
2012 Aug 14
7
[PATCH 0/7] Add tar compress, numericowner, excludes flags.
https://bugzilla.redhat.com/show_bug.cgi?id=847880 https://bugzilla.redhat.com/show_bug.cgi?id=847881 This patch series adds various optional arguments to the tar-in and tar-out commands. Firstly (1/7) an optional "compress" flag is added to select compression. This makes the calls tgz-in/tgz-out/txz-in/txz-out deprecated, and expands the range of compression types available.
2009 Aug 21
9
enable -Werror and all of gcc's warning options
Here is a bunch of small patches to make fish/ build with most warnings enabled: [1/9] edit.c: avoid warning about signed/unsigned comparison [2/9] fish.c: avoid warnings [3/9] tilde.c: avoid a warning [4/9] fish.c: avoid "assignment discards qualifiers..." warning [5/9] fish.c: avoid signed/unsigned-comparison warning [6/9] fish.c: don't perform arithmetic on void*
2015 Jul 02
0
[PATCH] Fix various -Wformat problems.
...ot; typ typ; pr " printf (\"}\\n\");\n"; pr " }\n"; @@ -270,7 +270,7 @@ Guestfish will prompt for these separately." pr "print_%s_indent (struct guestfs_%s *%s, const char *indent)\n" typ typ typ; pr "{\n"; if needs_i then ( - pr " unsigned int i;\n"; + pr " size_t i;\n"; pr "\n" ); List.iter ( @@ -288,7 +288,8 @@ Guestfish will prompt for these separately." pr " if (c_isprint (%s->%s[i]))\n" typ name;...
2015 Jul 02
0
[PATCH v2] Fix various -Wformat problems.
...ot; typ typ; pr " printf (\"}\\n\");\n"; pr " }\n"; @@ -270,7 +270,7 @@ Guestfish will prompt for these separately." pr "print_%s_indent (struct guestfs_%s *%s, const char *indent)\n" typ typ typ; pr "{\n"; if needs_i then ( - pr " unsigned int i;\n"; + pr " size_t i;\n"; pr "\n" ); List.iter ( @@ -288,7 +288,8 @@ Guestfish will prompt for these separately." pr " if (c_isprint (%s->%s[i]))\n" typ name;...
2015 Oct 20
3
[PATCH 1/2] generator: add a RelativePathnameList parameter type
...string_of_errcode errcode); + pr " }\n"; + pr " }\n"; + pr " }\n"; + pr_newline := true + (* not applicable *) | String _ | Device _ @@ -1383,7 +1401,7 @@ and generate_client_actions hash () = let needs_i = List.exists (function - | StringList _ | DeviceList _ -> true + | StringList _ | DeviceList _ | RelativePathnameList _ -> true | _ -> false) args || List.exists (function | OStringList _ -> true @@ -1419,7 +1437,8 @@ and generate_client_actions ha...
2015 Oct 21
2
[PATCH 1/2] generator: add a FilenameList parameter type
...string_of_errcode errcode); + pr " }\n"; + pr " }\n"; + pr " }\n"; + pr_newline := true + (* not applicable *) | String _ | Device _ @@ -1383,7 +1401,7 @@ and generate_client_actions hash () = let needs_i = List.exists (function - | StringList _ | DeviceList _ -> true + | StringList _ | DeviceList _ | FilenameList _ -> true | _ -> false) args || List.exists (function | OStringList _ -> true @@ -1419,7 +1437,8 @@ and generate_client_actions hash () =...
2012 Oct 30
5
[PATCH v3 0/5] Add symbol versioning.
This is a simpler patch series to add symbol versioning. I have pushed patches 1-3 upstream. Rich.
2012 Oct 30
7
[PATCH v2 0/7] Add symbol versioning (now working).
This rather more complex patch series adds symbol versioning (7/7 shows it in action). This works for me, tested by running old and new virt-inspector binaries against the new library. Rich.
2012 Jul 14
6
[PATCH 0/6] Allow non-optargs functions to gain optional arguments.
This rather complex set of patches allow non-optargs functions to gain optional arguments, while preserving source and binary backwards compatibility. The problem is that we cannot add an optional argument to an existing function. For example, we might want to add flags to the 'lvresize' API which currently has no optional arguments.
2009 Aug 03
1
[PATCH 1/2] Convert all TABs-as-indentation to spaces.
...> + pr " const char *%s;\n" n + | StringList n -> + pr " int %s_len;\n" n; + pr " const char **%s;\n" n + | Bool n + | Int n -> + pr " int %s;\n" n ) (snd style); let needs_i = - (match fst style with - | RStringList _ | RStructList _ -> true - | RErr | RBool _ | RInt _ | RInt64 _ | RConstString _ - | RConstOptString _ - | RString _ | RBufferOut _ | RStruct _ | RHashtable _ -> false) || - List.exists (function StringList _ -> true | _ -> false) (snd st...
2017 Apr 21
0
[PATCH 1/2] generator: Simplify the handling of string parameters.
...Dev_or_Path|Mountable_or_Path| + FileIn|FileOut|Key|Filename), _) | BufferIn _ | StringList _ - | DeviceList _ - | Key _ | Pointer (_, _) | OptString _ | Bool _ @@ -1533,7 +1512,7 @@ and generate_client_actions actions () = let needs_i = List.exists (function - | StringList _ | DeviceList _ | FilenameList _ -> true + | StringList _ -> true | _ -> false) args || List.exists (function | OStringList _ -> true @@ -1550,17 +1529,11 @@ and generate_client_actions actions () = (* Re...
2017 Apr 21
4
[PATCH 0/2] generator: Simplify the handling of string parameters.
Very large but mechanical change to the generator. Rich.