Displaying 13 results from an estimated 13 matches for "contains_fixed_appli".
2017 May 05
2
Re: [PATCH v2 1/2] appliance: search all types of appliances for each path separately
...nt
> dir_contains_files (guestfs_h *g, const char *dir, ...)
> {
> va_list args;
> const char *file;
>
> va_start (args, dir);
> while ((file = va_arg (args, const char *)) != NULL) {
> if (!dir_contains_file (g, dir, file)) {
> ...
>
> static int
> contains_fixed_appliance (guestfs_h *g, const char *path, void *data)
> {
> return dir_contains_files (g, path,
> "README.fixed",
> "kernel", "initrd", "root", NULL);
> }
>
> Passing NULL as the las...
2017 Apr 25
0
Re: [PATCH] appliance: reorder the steps to search for appliance
...(r == -1)
> - return -1;
> -
> - if (r == 1)
> - /* Step (2): build supermin appliance. */
> - return build_supermin_appliance (g, supermin_path,
> - kernel, initrd, appliance);
> -
> - /* Step (3). */
> r = find_path (g, contains_fixed_appliance, NULL, &path);
> if (r == -1)
> return -1;
> @@ -162,7 +152,7 @@ build_appliance (guestfs_h *g,
> return 0;
> }
>
> - /* Step (4). */
> + /* Step (2). */
The steps actually refer to the documentation. See in the same
file, starting from " *...
2017 Apr 28
0
Re: [PATCH] appliance: more reliable check for the supermin appliance
...lt;pbutsykin@virtuozzo.com>
> ---
> lib/appliance.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/lib/appliance.c b/lib/appliance.c
> index f12918573..5738e4e7f 100644
> --- a/lib/appliance.c
> +++ b/lib/appliance.c
> @@ -199,7 +199,9 @@ contains_fixed_appliance (guestfs_h *g, const char *path, void *data)
> static int
> contains_supermin_appliance (guestfs_h *g, const char *path, void *data)
> {
> - return dir_contains_files (g, path, "supermin.d", NULL);
> + return dir_contains_files (g, path,
> +...
2017 May 04
0
Re: [PATCH v1 1/2] appliance: search all types of appliances for each path separately
...char *kernel;
> + char *initrd;
> + char *image;
> +} appliance_files;
As a matter of preference, I think that typedefs hide the meaning of
the code, so it becomes unclear what we are passing around as a
parameter. Attached is a patch which turns this into a simple struct.
> + r = contains_fixed_appliance (g, path, NULL);
> if (r == 1) {
> const size_t len = strlen (path);
> - *kernel = safe_malloc (g, len + 6 /* "kernel" */ + 2);
> - *initrd = safe_malloc (g, len + 6 /* "initrd" */ + 2);
> - *appliance = safe_malloc (g, len + 4 /* "root&q...
2016 May 12
0
[PATCH 3/4] appliance: Move code for creating supermin appliance directory to tmpdirs.c.
...-git a/src/appliance.c b/src/appliance.c
index 2cf6374..d293c2b 100644
--- a/src/appliance.c
+++ b/src/appliance.c
@@ -48,7 +48,7 @@ static int dir_contains_files (guestfs_h *g, const char *dir, ...);
static int contains_old_style_appliance (guestfs_h *g, const char *path, void *data);
static int contains_fixed_appliance (guestfs_h *g, const char *path, void *data);
static int contains_supermin_appliance (guestfs_h *g, const char *path, void *data);
-static int build_supermin_appliance (guestfs_h *g, const char *supermin_path, uid_t uid, char **kernel, char **initrd, char **appliance);
+static int build_superm...
2020 Apr 07
2
Re: [PATCH virt-v2v] v2v: Allow temporary directory to be set on a global basis.
On Tue, Apr 07, 2020 at 02:33:20PM +0200, Pino Toscano wrote:
> On Tuesday, 7 April 2020 14:18:47 CEST Richard W.M. Jones wrote:
> > On Tue, Apr 07, 2020 at 01:25:02PM +0200, Pino Toscano wrote:
> > > The important thing is still that that you need to have space for the
> > > temporary files somewhere: be it /var/tmp, /mnt/scratch, whatever.
> > > Because of
2020 Apr 07
0
Re: [PATCH virt-v2v] v2v: Allow temporary directory to be set on a global basis.
...the end though, libguestfs prefers a supermin appliance before a
fixed appliance; the whole logic is here:
https://github.com/libguestfs/libguestfs/blob/c2c11382bbeb4500f3388a31ffd08cfc18b0de40/lib/appliance.c
In particular, see the locate_or_build_appliance function and the
comment before it, and contains_fixed_appliance &
contains_supermin_appliance helper functions.
If you have a setup like:
/usr/lib64/guestfs
├── initrd
├── kernel
├── README.fixed
├── root
└── supermin.d
├── base.tar.gz
└── packages
with LIBGUESTFS_PATH=/usr/lib64/guestfs, then the logic fill find first
the two files under sup...
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
2016 Mar 06
8
[PATCH 0/5] Use less stack.
Various changes/fixes to use smaller stack frames.
Rich.
2016 Mar 07
2
[PATCH v2] Use less stack.
...tic int dir_contains_files (const char *dir, ...);
+static int dir_contains_file (guestfs_h *g, const char *dir, const char *file);
+static int dir_contains_files (guestfs_h *g, const char *dir, ...);
static int contains_old_style_appliance (guestfs_h *g, const char *path, void *data);
static int contains_fixed_appliance (guestfs_h *g, const char *path, void *data);
static int contains_supermin_appliance (guestfs_h *g, const char *path, void *data);
@@ -170,13 +170,13 @@ build_appliance (guestfs_h *g,
static int
contains_old_style_appliance (guestfs_h *g, const char *path, void *data)
{
- return dir_contai...
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.
2012 Jul 21
8
[PATCH libguestfs 0/4] Add a libvirt backend to libguestfs.
This preliminary patch series adds a libvirt backend to libguestfs.
It's for review only because although it launches the guest OK, there
are some missing features that need to be implemented.
The meat of the patch is in part 4/4.
To save you the trouble of interpreting libxml2 fragments, an example
of the generated XML and the corresponding qemu command line are
attached below. Note the
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