search for: guestfs_safe_malloc

Displaying 10 results from an estimated 10 matches for "guestfs_safe_malloc".

2011 Jan 05
0
Fwd: Review of libguestfs ruby bindings
...DOC_FILES) end Full disclosure, though; I haven't yet figured out how to include that interactive help in an RPM. extconf.rb file - looks reasonable enough. _guestfs.c - lots of code here (auto-generated), so I won't do a line-by-line review. I'll point out a few things though. 1) guestfs_safe_malloc() is used frequently. This is fine, though it is *slightly* better to use ALLOC_N and friends from ruby.h. Those functions try to allocate memory, and if they fail, run the gc to free up memory and try again. That is essentially never going to happen on 64-bit, but with a fragmented enough 32-bi...
2009 Nov 18
1
[PATCH] generator: Fix API of functions that return RBufferOut
...;; "100"]], "")], "read part of a file", "\ This command lets you read part of a file. It reads C<count> @@ -5107,7 +5109,7 @@ and generate_client_actions () = #define error guestfs_error //#define perrorf guestfs_perrorf -//#define safe_malloc guestfs_safe_malloc +#define safe_malloc guestfs_safe_malloc #define safe_realloc guestfs_safe_realloc //#define safe_strdup guestfs_safe_strdup #define safe_memdup guestfs_safe_memdup @@ -5396,8 +5398,20 @@ check_state (guestfs_h *g, const char *caller) pr " /* caller will free this */\n";...
2012 Jan 18
4
[PATCH 1/4] ocaml: Add -Wno-missing-field-initializers to avoid a warning.
From: "Richard W.M. Jones" <rjones at redhat.com> --- configure.ac | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/configure.ac b/configure.ac index fa97479..6e42423 100644 --- a/configure.ac +++ b/configure.ac @@ -141,6 +141,10 @@ if test "$gl_gcc_warnings" = yes; then # Work around warning in src/inspect.c. This seems to be a bug in gcc
2009 Aug 17
1
two more warning-avoidance patches
..._quote arg) | StringList n, _ | DeviceList n, _ -> - pr ", %s" n + pr ", (char **) %s" n | Int _, arg -> let i = try int_of_string arg @@ -9019,7 +9019,7 @@ and generate_bindtests () = #define safe_malloc guestfs_safe_malloc static void -print_strings (char * const* const argv) +print_strings (char *const *argv) { int argc; -- 1.6.4.378.g88f2f
2009 Aug 27
1
[PATCH 4/4] build: enable gcc warnings in capitests/ and ocaml/
...rtions(+), 1 deletions(-) diff --git a/ocaml/guestfs_c.c b/ocaml/guestfs_c.c index f983696..9a7454d 100644 --- a/ocaml/guestfs_c.c +++ b/ocaml/guestfs_c.c @@ -131,7 +131,7 @@ ocaml_guestfs_strings_val (guestfs_h *g, value sv) { CAMLparam1 (sv); char **r; - int i; + unsigned int i; r = guestfs_safe_malloc (g, sizeof (char *) * (Wosize_val (sv) + 1)); for (i = 0; i < Wosize_val (sv); ++i) -- 1.6.4.1.359.g4fc77 >From 27420d5dcf7ba550751323ea2f27cf45b9146a91 Mon Sep 17 00:00:00 2001 From: Jim Meyering <meyering at redhat.com> Date: Thu, 27 Aug 2009 12:36:25 +0200 Subject: [PATCH libgue...
2009 Aug 17
13
total warning-removal for daemon/
The warnings in daemon were aggravating and risky for development (too easy to miss new ones) so I spent some time last week and today working on removing them. The first patch gets us down to almost no warnings with the original -Wall setting. That was by far the hardest part. Once I'd done that, I enabled nearly all of gcc's warnings via gnulib's warnings and manywarnings modules
2010 Aug 31
13
[PATCH v2] Add progress bars
This is an updated and extended version of the original patch: https://www.redhat.com/archives/libguestfs/2010-August/msg00163.html This adds OCaml and Perl bindings (both tested), support for progress bars in virt-resize, and adds progress notifications to a number of the simpler commands. Still to do is to add progress messages to more commands. There are still a few commands which would be
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.
2012 Mar 13
2
[PATCH 0/2] 'int' to 'size_t' changes
These two patches are probably not completely independent, but separating them is a lot of work. With *both* patches applied, all the tests and extra-tests pass. That's no guarantee however that there isn't a mistake, so I don't think this patch is a candidate for the 1.16 branch, until it's had a lot more testing in development. Rich.
2009 Aug 03
1
[PATCH 1/2] Convert all TABs-as-indentation to spaces.
...alueCStr (%sv) : NULL;\n" n n n - | StringList n -> - pr " char **%s;\n" n; - pr " Check_Type (%sv, T_ARRAY);\n" n; - pr " {\n"; - pr " int i, len;\n"; - pr " len = RARRAY_LEN (%sv);\n" n; - pr " %s = guestfs_safe_malloc (g, sizeof (char *) * (len+1));\n" - n; - pr " for (i = 0; i < len; ++i) {\n"; - pr " VALUE v = rb_ary_entry (%sv, i);\n" n; - pr " %s[i] = StringValueCStr (v);\n" n; - pr " }\n"; - pr " %s[len] = NULL...