search for: set_child_rlimit

Displaying 12 results from an estimated 12 matches for "set_child_rlimit".

Did you mean: set_child_rlimits
2015 Oct 14
2
[PATCH 1/2] lib: info: Move common code for setting child rlimits.
..._output (guestfs_h *g, const char *filename); static char *old_parser_disk_format (guestfs_h *g, const char *filename); static int64_t old_parser_disk_virtual_size (guestfs_h *g, const char *filename); static int old_parser_disk_has_backing_file (guestfs_h *g, const char *filename); +static void set_child_rlimits (struct command *); char * guestfs_impl_disk_format (guestfs_h *g, const char *filename) @@ -276,12 +277,7 @@ get_json_output (guestfs_h *g, const char *filename) guestfs_int_cmd_add_arg (cmd, fdpath); guestfs_int_cmd_set_stdout_callback (cmd, parse_json, &tree,...
2018 Sep 21
4
[PATCH v2] lib: Use qemu-img info -U option to avoid locking error.
...--git a/lib/info.c b/lib/info.c index 2eadc1c11..74e4424b8 100644 --- a/lib/info.c +++ b/lib/info.c @@ -57,6 +57,7 @@ cleanup_json_t_decref (void *ptr) #endif static json_t *get_json_output (guestfs_h *g, const char *filename); +static int qemu_img_supports_U_option (guestfs_h *g); static void set_child_rlimits (struct command *); char * @@ -149,6 +150,11 @@ get_json_output (guestfs_h *g, const char *filename) guestfs_int_cmd_add_arg (cmd, "qemu-img"); guestfs_int_cmd_add_arg (cmd, "info"); + switch (qemu_img_supports_U_option (g)) { + case -1: return NULL; + case 0: br...
2018 Oct 02
0
Re: [PATCH v2] lib: Use qemu-img info -U option to avoid locking error.
...2eadc1c11..74e4424b8 100644 > --- a/lib/info.c > +++ b/lib/info.c > @@ -57,6 +57,7 @@ cleanup_json_t_decref (void *ptr) > #endif > > static json_t *get_json_output (guestfs_h *g, const char *filename); > +static int qemu_img_supports_U_option (guestfs_h *g); > static void set_child_rlimits (struct command *); > > char * > @@ -149,6 +150,11 @@ get_json_output (guestfs_h *g, const char *filename) > > guestfs_int_cmd_add_arg (cmd, "qemu-img"); > guestfs_int_cmd_add_arg (cmd, "info"); > + switch (qemu_img_supports_U_option (g)) { > +...
2016 Jan 09
0
[PATCH] build: Require qemu >= 1.3.0 and yajl.
...(guestfs_h *g, const char *filename); -#endif -static char *old_parser_disk_format (guestfs_h *g, const char *filename); -static int64_t old_parser_disk_virtual_size (guestfs_h *g, const char *filename); -static int old_parser_disk_has_backing_file (guestfs_h *g, const char *filename); static void set_child_rlimits (struct command *); char * guestfs_impl_disk_format (guestfs_h *g, const char *filename) { - switch (which_parser (g)) { - case QEMU_IMG_INFO_NEW_PARSER: - return get_disk_format (g, filename); - case QEMU_IMG_INFO_OLD_PARSER: - return old_parser_disk_format (g, filename); - case QE...
2017 Dec 15
0
[PATCH v2] lib/info: Remove /dev/fd hacking and pass a true filename to qemu-img info.
..._add_arg (cmd, filename); + else { + rel_filename = safe_asprintf (g, "./%s", filename); + guestfs_int_cmd_add_arg (cmd, rel_filename); + } guestfs_int_cmd_set_stdout_callback (cmd, parse_json, &tree, CMD_STDOUT_FLAG_WHOLE_BUFFER); set_child_rlimits (cmd); r = guestfs_int_cmd_run (cmd); - close (fd); if (r == -1) return NULL; if (!WIFEXITED (r) || WEXITSTATUS (r) != 0) { -- 2.15.1
2017 Dec 15
2
[PATCH v2] lib/info: Remove /dev/fd hacking and pass a true filename
v1 posted here: https://www.redhat.com/archives/libguestfs/2017-December/msg00050.html v2 fixes the tests by rewriting relative paths as ./filename (so that filenames like "file:foo" work).
2017 Dec 12
1
Re: failure to virt-sysprep (FC27?)
...ot;--output"); guestfs_int_cmd_add_arg (cmd, "json"); - guestfs_int_cmd_add_arg (cmd, fdpath); + guestfs_int_cmd_add_arg (cmd, filename); guestfs_int_cmd_set_stdout_callback (cmd, parse_json, &tree, CMD_STDOUT_FLAG_WHOLE_BUFFER); set_child_rlimits (cmd); r = guestfs_int_cmd_run (cmd); - close (fd); if (r == -1) return NULL; if (!WIFEXITED (r) || WEXITSTATUS (r) != 0) { -- 2.15.1 --HKEL+t8MFpg/ASTE--
2017 Dec 12
4
Re: failure to virt-sysprep (FC27?)
On Thu, Nov 23, 2017 at 02:05:32PM +0000, Richard W.M. Jones wrote: > On Thu, Nov 23, 2017 at 03:00:45PM +0200, Yaniv Kaul wrote: > > On Thu, Nov 23, 2017 at 10:57 AM, Richard W.M. Jones <rjones@redhat.com> > > wrote: > > > > > On Tue, Nov 21, 2017 at 11:43:54PM +0200, Yaniv Kaul wrote: > > > > Since I upgrading to FC27, I *sometimes* fail to
2018 Feb 12
0
[PATCH v2 1/1] Switch from YAJL to Jansson
...ee (* (yajl_val *) ptr); + json_decref (* (json_t **) ptr); } #else -#define CLEANUP_YAJL_TREE_FREE +#define CLEANUP_JSON_T_DECREF #endif -static yajl_val get_json_output (guestfs_h *g, const char *filename); +static json_t *get_json_output (guestfs_h *g, const char *filename); static void set_child_rlimits (struct command *); char * guestfs_impl_disk_format (guestfs_h *g, const char *filename) { - size_t i, len; - CLEANUP_YAJL_TREE_FREE yajl_val tree = get_json_output (g, filename); + CLEANUP_JSON_T_DECREF json_t *tree = get_json_output (g, filename); + json_t *node; if (tree == NULL)...
2017 Nov 23
0
[PATCH 1/1] Switch from YAJL to Jansson
...ee (* (yajl_val *) ptr); + json_decref (* (json_t **) ptr); } #else -#define CLEANUP_YAJL_TREE_FREE +#define CLEANUP_JSON_T_DECREF #endif -static yajl_val get_json_output (guestfs_h *g, const char *filename); +static json_t *get_json_output (guestfs_h *g, const char *filename); static void set_child_rlimits (struct command *); char * guestfs_impl_disk_format (guestfs_h *g, const char *filename) { - size_t i, len; - CLEANUP_YAJL_TREE_FREE yajl_val tree = get_json_output (g, filename); + CLEANUP_JSON_T_DECREF json_t *tree = get_json_output (g, filename); + json_t *node; if (tree == NULL)...
2018 Feb 12
2
[PATCH v2 0/1] RFC: switch from YAJL to Jansson
Hi, recently, there was a discussion in the development list of libvirt on switching to a different JSON library than YAJL [1]. Since we use YAJL, and the points there IMHO apply to libguestfs as well, I decided to give a try in switching to Jansson [2]. The result IMHO is nice, with the additional APIs of Jansson that simplify some of our code. Unlike with YAJL, I did not set a minimum
2017 Nov 23
4
[PATCH 0/1] RFC: switch from YAJL to Jansson
Hi, recently, there was a discussion in the development list of libvirt on switching to a different JSON library than YAJL [1]. Since we use YAJL, and the points there IMHO apply to libguestfs as well, I decided to give a try in switching to Jansson [2]. The result IMHO is nice, with the additional APIs of Jansson that simplify some of our code. Unlike with YAJL, I did not set a minimum