Displaying 20 results from an estimated 400 matches similar to: "[PATCH 0/10] Add a mini-library for running external commands."
2015 Feb 02
8
[PATCH 0/7 v2] Make copy_in & copy_out APIs, and use copy_in in customize
Hi,
attached there is the second version of the patch series adding
copy_in and copy_out in the library, mostly moving them from guestfish.
It also adds the copy_in usage in virt-customize, as aid in a new image
building.
Thanks,
Pino Toscano (7):
cmd: add a way to run (and wait) asynchronously commands
cmd: add a child-setup callback
cmd: add the possibility to get a fd to the process
2015 Jan 26
6
[PATCH 1/6] cmd: add a way to run (and wait) asynchronously commands
---
src/command.c | 64 +++++++++++++++++++++++++++++++++++++++++++-------
src/guestfs-internal.h | 3 +++
2 files changed, 58 insertions(+), 9 deletions(-)
diff --git a/src/command.c b/src/command.c
index 4bb469b..e26573d 100644
--- a/src/command.c
+++ b/src/command.c
@@ -360,7 +360,7 @@ debug_command (struct command *cmd)
}
static int
-run_command (struct command *cmd)
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:
2011 Dec 23
4
Remove temporary directories created during appliance building along error paths (RHBZ#769680)
https://bugzilla.redhat.com/show_bug.cgi?id=769680
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.
2013 Sep 06
1
[PATCH] arm: appliance: Add support for device trees (dtb's).
This is the libguestfs companion patch to:
https://www.redhat.com/archives/libguestfs/2013-September/msg00045.html
Rich.
2020 Feb 26
2
[PATCH] lib: command: switch from select() to poll()
select() has a maximum value for the FDs it can monitor, and since
the libguestfs library can be used in other applications, this limit
may be hit by users in case lots of FDs are opened.
As solution, switch to poll(): it has a slightly better interface to
check what changed and for which FD, and it does not have a limit in the
value of the FDs monitored.
poll() is supported on the platforms we
2020 Feb 26
1
Re: [PATCH] lib: command: switch from select() to poll()
On Wednesday, 26 February 2020 15:08:24 CET Daniel P. Berrangé wrote:
> On Wed, Feb 26, 2020 at 02:39:04PM +0100, Pino Toscano wrote:
> > select() has a maximum value for the FDs it can monitor, and since
> > the libguestfs library can be used in other applications, this limit
> > may be hit by users in case lots of FDs are opened.
> >
> > As solution, switch to
2013 Jan 25
4
[PATCH 0/3] Use __attribute__((cleanup(...)))
This patch series changes a small part of the library to use
__attribute__((cleanup(...))) to automatically free memory when
pointers go out of the current scope.
In general terms this seems to be a small win although you do have to
use it carefully. For functions where you can completely get rid of
the "exit code paths", it can simplify things. For a good example,
see the
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/guestfs-internal.h | 1 -
lib/command.c
2014 Oct 02
4
[PATCH 0/3] RFC: appliance flavours
Hi,
this is a prototype of something I've around for some time.
Basically it is about adding new appliances in addition to the main
one currently used and kept up-to-date automatically: this way it is
possible to create new appliances with extra packages, to be used in
specific contexts (like virt-rescue, with more network/recovery tools)
without filling the main appliance.
It's still
2014 Jan 16
3
[PATCH 0/2] Don't use snapshot=on
QEMU upstream has broken snapshot=on ... again.
These two patches stop using it entirely. Instead we run
'qemu-img create' to create overlay disks as required.
Note that the libvirt and UML backends were already doing this: The
libvirt backend because <transient/> has never worked, and the UML
backend was running uml_mkcow because the UML-equivalent syntax of
snapshot=on was
2013 Dec 09
1
[PATCH] launch: switch from -nographic to -display none
The latter is a better way to disable the qemu display output as we
need to, without enabling extra devices (which are disabled already,
anyway).
Also, related to the change above, ban the -display parameter from the
ones that can be supplied by the user.
---
configure.ac | 8 ++++----
src/launch-direct.c | 12 ++++++++----
src/launch.c | 1 +
3 files changed, 13 insertions(+), 8
2014 Apr 29
2
Adventures in building libguestfs on non-x86 architectures for Debian
Hi,
things are progressing slowly, but I feel that eventually I'll be
getting there: supermin can be built on all Linux-based architectures
that are part of Debian/unstable[1] -- (except for sparc, but I'll
ignore that for now.) libguestfs on the other hand currently fails
launching the appliance (necessary for running tests) on everything but
x86 and mips.
Apparently, qemu-system-arm
2020 Feb 26
0
Re: [PATCH] lib: command: switch from select() to poll()
On Wed, Feb 26, 2020 at 02:39:04PM +0100, Pino Toscano wrote:
> select() has a maximum value for the FDs it can monitor, and since
> the libguestfs library can be used in other applications, this limit
> may be hit by users in case lots of FDs are opened.
>
> As solution, switch to poll(): it has a slightly better interface to
> check what changed and for which FD, and it does
2015 Feb 02
1
Re: [PATCH 5/6] New APIs: copy-in and copy-out
On Mon, Jan 26, 2015 at 05:04:10PM +0100, Pino Toscano wrote:
> Currently implemented as guestfish commands, provide them instead as
> single source -> destination functions for the library, so they can be
> used also in other places.
>
> These functions are not added to guestfish, since guestfish has its own
> implementation (which will soon switch to call copy-in and
2014 Jan 28
11
[PATCH 00/10] New API: disk-create for creating blank disks.
A lot of code runs 'qemu-img create' or 'truncate' to create blank
disk images.
In the past I resisted adding an API to do this, since it essentially
duplicates what you can already do using other tools (ie. qemu-img).
However this does simplify calling code quite a lot since qemu-img is
somewhat error-prone to use (eg: don't try to create a disk called
"foo:bar")
2017 Jun 20
2
[PATCH v2 1/2] mllib: add new Common_utils.run_commands
Mostly modelled after a snippet implemented in dib, it is an helper
function to run multiple commands in parallel, waiting for all of them
at once, and returning all their exit codes. It is possible to pass
custom descriptors for collecting stdout and stderr of each command.
Common_utils.run_command is adapted to use few helper methods used by
run_commands, so all the existing code using it
2002 Jul 22
2
finding the colour at a point
I think this was asked recently but I can't find the item.
Is it possible to find the colour at a point on a graphics page?
I want to estimate the area of a complex shape by colouring it then random
sampling from an enclosing box ...
Richard Rowe
Richard Rowe
Senior Lecturer
Department of Zoology and Tropical Ecology, James Cook University
Townsville, Queensland 4811, Australia
fax (61)7
2017 Apr 07
1
[PATCH 1/2] mllib: add new Common_utils.run_commands
Mostly modelled after a snippet implemented in dib, it is an helper
function to run multiple commands in parallel, waiting for all of them
at once, and returning all their exit codes. It is possible to pass
custom descriptors for collecting stdout and stderr of each command.
Common_utils.run_command is adapted to use it, so all the existing
code using it keeps working.
Add a simple unit tests