search for: guestfs_int_cmd_clear_close_fil

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

2023 Jul 11
1
[libguestfs PATCH] lib: remove guestfs_int_cmd_clear_close_files()
The last (only?) caller of guestfs_int_cmd_clear_close_files() disappeared in commit e4c396888056 ("lib/info: Remove /dev/fd hacking and pass a true filename to qemu-img info.", 2018-01-23), part of v1.37.36. Simplify the code by removing guestfs_int_cmd_clear_close_files(). Signed-off-by: Laszlo Ersek <lersek at redhat.com> --- lib/gues...
2018 Jan 12
1
Re: [PATCH v2] lib/info: Remove /dev/fd hacking and pass a true filename to qemu-img info.
...commit d50cb7bbb4cc18f69ea1425e9f5cee9685825f95. > > See also: > > https://www.redhat.com/archives/libguestfs/2017-November/thread.html#00226 > https://www.redhat.com/archives/libguestfs/2017-December/thread.html#00044 > --- Mostly LGTM -- a couple of notes below. > - guestfs_int_cmd_clear_close_files (cmd); Don't we want this regardless? > + if (filename[0] == '/') > + guestfs_int_cmd_add_arg (cmd, filename); > + else { > + rel_filename = safe_asprintf (g, "./%s", filename); > + guestfs_int_cmd_add_arg (cmd, rel_filename); There's guestfs...
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).
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 Dec 15
0
[PATCH v2] lib/info: Remove /dev/fd hacking and pass a true filename to qemu-img info.
..."disk info: fstat: %s", filename); - close (fd); - return NULL; - } - if (S_ISDIR (statbuf.st_mode)) { - error (g, "disk info: %s is a directory", filename); - close (fd); - return NULL; - } - - snprintf (fdpath, sizeof fdpath, "/dev/fd/%d", fd); - guestfs_int_cmd_clear_close_files (cmd); guestfs_int_cmd_add_arg (cmd, "qemu-img"); guestfs_int_cmd_add_arg (cmd, "info"); guestfs_int_cmd_add_arg (cmd, "--output"); guestfs_int_cmd_add_arg (cmd, "json"); - guestfs_int_cmd_add_arg (cmd, fdpath); + if (filename[0] == '/...
2017 Dec 12
1
Re: failure to virt-sysprep (FC27?)
..."disk info: fstat: %s", filename); - close (fd); - return NULL; - } - if (S_ISDIR (statbuf.st_mode)) { - error (g, "disk info: %s is a directory", filename); - close (fd); - return NULL; - } - - snprintf (fdpath, sizeof fdpath, "/dev/fd/%d", fd); - guestfs_int_cmd_clear_close_files (cmd); guestfs_int_cmd_add_arg (cmd, "qemu-img"); guestfs_int_cmd_add_arg (cmd, "info"); 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 (cm...
2015 May 26
0
[PATCH] lib: Limit space and time used by 'qemu-img info' subprocess.
...ERED 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 command *); extern void guestfs_int_cmd_set_child_callback (struct command *, cmd_child_callback child_callback, void *data); diff --git a/src/info.c b/src/info.c index bd4221c..bfd7860 100644 --- a/src/info.c +++ b/src/info.c @@ -31,6 +31,14 @@ #include <assert.h> #include <s...
2017 Oct 06
2
[PATCH] lib: Pick up qemu-img path at build time.
..., r, QEMU_IMG, orig_filename); return -1; } diff --git a/lib/info.c b/lib/info.c index f7378adfd..4464df994 100644 --- a/lib/info.c +++ b/lib/info.c @@ -191,7 +191,7 @@ get_json_output (guestfs_h *g, const char *filename) snprintf (fdpath, sizeof fdpath, "/dev/fd/%d", fd); guestfs_int_cmd_clear_close_files (cmd); - guestfs_int_cmd_add_arg (cmd, "qemu-img"); + guestfs_int_cmd_add_arg (cmd, QEMU_IMG); guestfs_int_cmd_add_arg (cmd, "info"); guestfs_int_cmd_add_arg (cmd, "--output"); guestfs_int_cmd_add_arg (cmd, "json"); diff --git a/m4/guestfs-qemu...
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
2015 Feb 14
2
[PATCH 0/2] Change guestfs__*
libguestfs has used double and triple underscores in identifiers. These aren't valid for global names in C++. (http://stackoverflow.com/a/228797) These large but completely mechanical patches change the illegal identifiers to legal ones. Rich.