search for: cmd_stdout_flag_whole_buff

Displaying 20 results from an estimated 22 matches for "cmd_stdout_flag_whole_buff".

2013 Dec 09
1
[PATCH] launch: switch from -nographic to -display none
..."-nographic"); + guestfs___cmd_add_arg (cmd1, "-display"); + guestfs___cmd_add_arg (cmd1, "none"); guestfs___cmd_add_arg (cmd1, "-help"); guestfs___cmd_set_stdout_callback (cmd1, read_all, &data->qemu_help, CMD_STDOUT_FLAG_WHOLE_BUFFER); @@ -927,7 +929,8 @@ test_qemu (guestfs_h *g, struct backend_direct_data *data) goto error; guestfs___cmd_add_arg (cmd2, g->hv); - guestfs___cmd_add_arg (cmd2, "-nographic"); + guestfs___cmd_add_arg (cmd2, "-display"); + guestfs___cmd_add_arg (cmd2, "none...
2015 May 26
0
[PATCH] lib: Limit space and time used by 'qemu-img info' subprocess.
...ff --git a/src/guestfs-internal.h b/src/guestfs-internal.h index 414a634..4f06c37 100644 --- a/src/guestfs-internal.h +++ b/src/guestfs-internal.h @@ -864,6 +864,7 @@ extern void guestfs_int_cmd_set_stdout_callback (struct command *, cmd_stdout_ca #define CMD_STDOUT_FLAG_UNBUFFERED 1 #define CMD_STDOUT_FLAG_WHOLE_BUFFER 2 extern void guestfs_int_cmd_set_stderr_to_stdout (struct command *); +extern void guestfs_int_cmd_set_child_rlimit (struct command *, int resource, long limit); extern void guestfs_int_cmd_clear_capture_errors (struct command *); extern void guestfs_int_cmd_clear_close_files (struct comma...
2017 Sep 12
0
[PATCH v2 2/5] lib: qemu: Factor out common code for reading and writing cache files.
...guestfs_int_cmd_add_arg (cmd1, g->hv); - guestfs_int_cmd_add_arg (cmd1, "-display"); - guestfs_int_cmd_add_arg (cmd1, "none"); - guestfs_int_cmd_add_arg (cmd1, "-help"); - guestfs_int_cmd_set_stdout_callback (cmd1, read_all, &data->qemu_help, - CMD_STDOUT_FLAG_WHOLE_BUFFER); - r = guestfs_int_cmd_run (cmd1); - if (r == -1 || !WIFEXITED (r) || WEXITSTATUS (r) != 0) - goto error; + guestfs_int_cmd_add_arg (cmd, g->hv); + guestfs_int_cmd_add_arg (cmd, "-display"); + guestfs_int_cmd_add_arg (cmd, "none"); + guestfs_int_cmd_add_arg (cmd,...
2016 Mar 22
0
[PATCH v3 07/11] launch: direct: Don't run qemu -version.
...fs_int_cmd_add_arg (cmd2, g->hv); guestfs_int_cmd_add_arg (cmd2, "-display"); guestfs_int_cmd_add_arg (cmd2, "none"); - guestfs_int_cmd_add_arg (cmd2, "-version"); - guestfs_int_cmd_set_stdout_callback (cmd2, read_all, &data->qemu_version, - CMD_STDOUT_FLAG_WHOLE_BUFFER); - r = guestfs_int_cmd_run (cmd2); - if (r == -1 || !WIFEXITED (r) || WEXITSTATUS (r) != 0) - goto error; - - parse_qemu_version (g, data); - - guestfs_int_cmd_add_arg (cmd3, g->hv); - guestfs_int_cmd_add_arg (cmd3, "-display"); - guestfs_int_cmd_add_arg (cmd3, "none&q...
2017 Sep 11
4
[PATCH 0/4] lib: qemu: Add test for mandatory locking.
The patch I posted last week to disable mandatory locking for readonly drives (https://www.redhat.com/archives/libguestfs/2017-September/msg00013.html) was wrong in a couple of respects. Firstly it didn't work, which I didn't detect because my tests were testing the wrong thing. Oops. Secondly it used a simple version number check to detect qemu binaries implementing mandatory locking.
2017 Dec 15
0
[PATCH v2] lib/info: Remove /dev/fd hacking and pass a true filename to qemu-img info.
...'/') + guestfs_int_cmd_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).
2016 May 25
4
[PATCH 0/4] qemu: Use sqlite to store qemu detection data.
Patches 1 & 2 were posted previously here: https://www.redhat.com/archives/libguestfs/2016-May/msg00134.html Patch 3 is a hack so I can test this using my own version of qemu (the `-L ?' stuff is not upstream). Patch 4 is where the real action takes place: Replace the caching of qemu features in blob-like files with a sqlite database. Probably the best way to approach this patch is to
2017 Sep 12
8
[PATCH v3 0/6] launch: direct: Disable qemu locking when opening drives readonly.
v2 -> v3: - I addressed everything that Pino mentioned last time. - It's tricky to get a stable run when multiple copies of qemu are involved, because the same cache files get overwritten by parallel libguestfs. So I changed the names of the cache files to include the qemu binary key (size, mtime), which removes this conflict. This is in new patch 4/6. Rich.
2017 Sep 12
9
[PATCH v2 0/5] launch: direct: Disable qemu locking when opening drives readonly (RHBZ#1417306)
Patches 1-4 are almost the same as they are when previously posted here: https://www.redhat.com/archives/libguestfs/2017-September/msg00039.html Patch 5 actually uses the mandatory locking test to turn off locking in the narrow case where a drive is opened readonly, and then only for the drive being inspected. Passes ordinary tests (‘check-direct’ and ‘check-valgrind-direct’). Rich.
2017 Dec 12
1
Re: failure to virt-sysprep (FC27?)
...guestfs_int_cmd_add_arg (cmd, "--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--
2012 Oct 18
10
[PATCH 0/10] Add a mini-library for running external commands.
Inspired by libvirt's virCommand* internal mini-library, this adds some internal APIs for running commands. The first patch contains the new APIs. The subsequent patches change various parts of the library over to use it. Rich.
2016 May 18
2
[PATCH v2 0/2] lib: qemu: Memoize qemu feature detection.
v1 -> v2: - Rebase on top of Pino's version work. Two patches went upstream, these are the two remaining patches. Note the generation number is still inside the qemu.stat file. We could put it in the filename, I have no particular preference. Rich.
2015 Oct 05
0
[PATCH 2/2] Fix whitespace.
...63,7 +963,7 @@ test_qemu (guestfs_h *g, struct backend_direct_data *data) guestfs_int_cmd_add_arg (cmd1, "none"); guestfs_int_cmd_add_arg (cmd1, "-help"); guestfs_int_cmd_set_stdout_callback (cmd1, read_all, &data->qemu_help, - CMD_STDOUT_FLAG_WHOLE_BUFFER); + CMD_STDOUT_FLAG_WHOLE_BUFFER); r = guestfs_int_cmd_run (cmd1); if (r == -1 || !WIFEXITED (r) || WEXITSTATUS (r) != 0) goto error; @@ -973,7 +973,7 @@ test_qemu (guestfs_h *g, struct backend_direct_data *data) guestfs_int_cmd_add_arg (cmd2, "none"); guestfs...
2015 Oct 14
2
[PATCH 1/2] lib: info: Move common code for setting child rlimits.
...); 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, CMD_STDOUT_FLAG_WHOLE_BUFFER); -#ifdef RLIMIT_AS - guestfs_int_cmd_set_child_rlimit (cmd, RLIMIT_AS, 1000000000 /* 1GB */); -#endif -#ifdef RLIMIT_CPU - guestfs_int_cmd_set_child_rlimit (cmd, RLIMIT_CPU, 10 /* seconds */); -#endif + set_child_rlimits (cmd); r = guestfs_int_cmd_run (cmd); close (fd); if (r == -1)...
2016 May 17
2
[PATCH 0/2] Use -bios bios-fast.bin where supported.
NOTE: Not for upstream, yet. This depends on 3 non-upstream patches. - The qemu rework in libguestfs, which in turn depends on what Pino is up to. - Support for '-L ?' in qemu: https://lists.gnu.org/archive/html/qemu-devel/2016-05/threads.html#02596 - Support for bios-fast.bin in qemu: https://lists.gnu.org/archive/html/qemu-devel/2016-05/threads.html#02408 This commit
2016 May 18
2
[PATCH v2 0/2] Use -bios bios-fast.bin where supported.
This commit uses -bios bios-fast.bin if available, which basically stops SeaBIOS from trying to do PCI probing during boot, which is a waste of time when using the -kernel option. v1 -> v2: - Rebase on top of Pino's work. This still has 3 dependencies: - The qemu memoization work (v2). - Support for '-L ?' in qemu:
2016 May 12
7
[PATCH 0/4] lib: qemu: Memoize qemu feature detection.
Doing qemu feature detection in the direct backend takes ~100ms because we need to run `qemu -help' and `qemu -devices ?', and each of those interacts with glibc's very slow link loader. Fixing the link loader is really hard. Instead memoize the output of those two commands. This patch series first separates all the code dealing with qemu into a separate module (src/qemu.c) and
2015 Oct 05
3
[PATCH 1/2] Change 'fprintf (stdout,...)' -> printf.
Result of earlier copy and paste. --- align/scan.c | 35 ++++++++++--------- cat/cat.c | 39 +++++++++++---------- cat/filesystems.c | 69 +++++++++++++++++++------------------- cat/log.c | 35 ++++++++++--------- cat/ls.c | 61 +++++++++++++++++---------------- df/main.c | 43 ++++++++++++------------ diff/diff.c | 67
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