Displaying 10 results from an estimated 10 matches for "guestfs_int_cmd_pipe_run".
2017 Sep 11
1
[PATCH] lib: command: Print command before running it with guestfs_int_cmd_pipe_run.
...was about to run when debugging was enabled.
Fixes commit e98bb8692929a037f3452686719504aea31f311d.
---
lib/command.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/lib/command.c b/lib/command.c
index 970acf6e5..bc469de59 100644
--- a/lib/command.c
+++ b/lib/command.c
@@ -791,6 +791,9 @@ guestfs_int_cmd_pipe_run (struct command *cmd, const char *mode)
finish_command (cmd);
+ if (cmd->g->verbose)
+ debug_command (cmd);
+
/* Various options cannot be used here. */
assert (!cmd->capture_errors);
assert (!cmd->stdout_callback);
--
2.13.2
2017 Sep 20
1
Re: [PATCH 6/6] lib: Use guestfs_int_make_temp_path in a few more places.
On Tuesday, 19 September 2017 13:38:27 CEST Richard W.M. Jones wrote:
> diff --git a/lib/command.c b/lib/command.c
> index bc469de59..7018c3ac0 100644
> --- a/lib/command.c
> +++ b/lib/command.c
> @@ -815,8 +815,9 @@ guestfs_int_cmd_pipe_run (struct command *cmd, const char *mode)
> if (guestfs_int_lazy_make_tmpdir (cmd->g) == -1)
> goto error;
>
> - cmd->error_file =
> - safe_asprintf (cmd->g, "%s/cmderr.%d", cmd->g->tmpdir, ++cmd->g->unique);
> + cmd->error_file = gue...
2015 Sep 29
8
[PATCH 0/7] copy-in/copy-out: Capture errors from tar subprocess (RHBZ#1267032).
Commits 3c27f3d91e1566854747bbe844186783fc84f3a8 and
1b6f0daa9ae7fcc94e389232d0c397816cda973d added an internal API for
running commands asynchronously. It is only used by the copy-in and
copy-out APIs.
Unfortunately this made the command code very complex: it was almost
impossible to redirect stderr to a file, and there were a lot of
long-range dependencies through the file. It was also buggy:
2017 Sep 19
0
[PATCH 6/6] lib: Use guestfs_int_make_temp_path in a few more places.
...-1;
guestfs_int_cmd_add_arg (copycmd, "cp");
guestfs_int_cmd_add_arg (copycmd, varsfile);
guestfs_int_cmd_add_arg (copycmd, varst);
diff --git a/lib/command.c b/lib/command.c
index bc469de59..7018c3ac0 100644
--- a/lib/command.c
+++ b/lib/command.c
@@ -815,8 +815,9 @@ guestfs_int_cmd_pipe_run (struct command *cmd, const char *mode)
if (guestfs_int_lazy_make_tmpdir (cmd->g) == -1)
goto error;
- cmd->error_file =
- safe_asprintf (cmd->g, "%s/cmderr.%d", cmd->g->tmpdir, ++cmd->g->unique);
+ cmd->error_file = guestfs_int_make_temp_path (cmd-&...
2017 Sep 12
0
[PATCH v2 3/5] lib: qemu: Run QMP ‘query-commands’, ‘query-qmp-schema’ against the qemu binary.
...uoted (cmd,
+#ifdef MACHINE_TYPE
+ MACHINE_TYPE ","
+#endif
+ "accel=kvm:tcg");
+ guestfs_int_cmd_add_string_unquoted (cmd, " -qmp stdio");
+ guestfs_int_cmd_clear_capture_errors (cmd);
+
+ fd = guestfs_int_cmd_pipe_run (cmd, "r");
+ if (fd == -1)
+ return -1;
+
+ /* Read the output line by line. We expect to see:
+ * line 1: {"QMP": {"version": ... } } # greeting from QMP
+ * line 2: {"return": {}} # output from qmp_capabilities
+ * line 3: {&qu...
2017 Sep 19
7
[PATCH 0/6] Various clean ups in lib/
Miscellaneous small cleanups in lib/ directory.
Rich.
2017 Sep 20
7
[PATCH v2] 0/6] Various clean ups in lib/
v1 -> v2:
- Remove the unnecessary calls to guestfs_int_lazy_make_tmpdir
in the final patch.
Rich.
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 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.