Displaying 20 results from an estimated 23 matches for "guestfs_int_add_sprintf".
2016 Dec 18
3
[PATCH 1/2] launch: Rationalize how we construct the Linux kernel command line.
...nel can handle quoting in any
+ * case), and (b) we can append multiple parameters in a single
+ * argument, as we must do for the g->append parameter.
+ */
+
+ /* Force kernel to panic if daemon exits. */
+ guestfs_int_add_string (g, &argv, "panic=1");
+
+#ifdef __arm__
+ guestfs_int_add_sprintf (g, &argv, " mem=%dM", g->memsize);
+#endif
+
+#ifdef __i386__
+ /* Workaround for RHBZ#857026. */
+ guestfs_int_add_string (g, &argv, "noapic");
+#endif
+
+ /* Serial console. */
+ guestfs_int_add_string (g, &argv, SERIAL_CONSOLE);
+
+#ifdef EARLYPRINTK
+ /*...
2016 Feb 25
5
[PATCH] listfs: ignore the default btrfs subvolume
...struct guestfs_btrfssubvolume *this = &vols->val[i];
+
+ /* Ignore the default subvolume. We get it by simply mounting
+ * the whole device of this btrfs filesystem.
+ */
+ if (this->btrfssubvolume_id == (uint64_t) default_volume)
+ continue;
+
guestfs_int_add_sprintf (g, sb,
"btrfsvol:%s/%s",
device, this->btrfssubvolume_path);
--
2.5.0
2017 Jun 25
0
Re: [PATCH 1/2] launch: add support for autodetection of appliance image format
...eter ‘%s’"),
backingformat);
return -1;
}
}
so this hunk can just be omitted.
> @@ -321,7 +322,7 @@ disk_create_qcow2 (guestfs_h *g, const char *orig_filename, int64_t size,
> CLEANUP_FREE char *p = guestfs_int_qemu_escape_param (g, backingfile);
> guestfs_int_add_sprintf (g, &optionsv, "backing_file=%s", p);
> }
> - if (backingformat)
> + if (backingformat && STRNEQ (backingformat, AUTODETECTION_FORMAT))
> guestfs_int_add_sprintf (g, &optionsv, "backing_fmt=%s", backingformat);
> if (preallocation)
>...
2016 Feb 25
1
Re: [PATCH] listfs: ignore the default btrfs subvolume
...+ /* Ignore the default subvolume. We get it by simply
> > mounting
> > + * the whole device of this btrfs filesystem.
> > + */
> > + if (this->btrfssubvolume_id == (uint64_t) default_volume)
> > + continue;
> > +
> > guestfs_int_add_sprintf (g, sb,
> > "btrfsvol:%s/%s",
> > device, this->btrfssubvolume_path);
>
> ACK.
>
> Was there an RHBZ# for this? Can't seem to find it ...
I least none that I am aware of, not even a bsc# as we have an pretty
old version on openSUSE....
2016 Feb 25
0
Re: [PATCH] listfs: ignore the default btrfs subvolume
...his = &vols->val[i];
> +
> + /* Ignore the default subvolume. We get it by simply mounting
> + * the whole device of this btrfs filesystem.
> + */
> + if (this->btrfssubvolume_id == (uint64_t) default_volume)
> + continue;
> +
> guestfs_int_add_sprintf (g, sb,
> "btrfsvol:%s/%s",
> device, this->btrfssubvolume_path);
ACK.
Was there an RHBZ# for this? Can't seem to find it ...
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualizat...
2016 Dec 18
0
[PATCH 2/2] launch: Validate $TERM before passing it through to the kernel command line.
...rm__) || defined(__aarch64__)
@@ -425,7 +449,7 @@ guestfs_int_appliance_command_line (guestfs_h *g, const char *appliance_dev,
guestfs_int_add_string (g, &argv, "guestfs_network=1");
/* TERM environment variable. */
- if (term)
+ if (term && valid_term (term))
guestfs_int_add_sprintf (g, &argv, "TERM=%s", term);
else
guestfs_int_add_string (g, &argv, "TERM=linux");
--
2.10.2
2017 Apr 19
1
[PATCH] appliance: Pass root=UUID=... to supermin.
By passing root=UUID=... to supermin, we make the appliance boot
process less sensitive to the non-deterministic process of scanning
SCSI disks (of which much more to come).
This patch should be tested alongside the supermin patch posted here:
https://www.redhat.com/archives/libguestfs/2017-April/msg00174.html
which in turn requires this supermin patch series:
2020 Mar 05
5
[PATCH v2 0/4] daemon: Translate device names if Linux device is unstable (RHBZ#1804207).
v1 was here:
https://www.redhat.com/archives/libguestfs/2020-February/msg00220.html
This patch series is a little bit better. It's still a bit of a hack.
The _real_ fix for this is outlined in the TODO file (see patch 1) but
that requires a lot more work than we could do before 1.42 is
released, unless we delay 1.42 for a lot longer. I'm hoping with this
to have something which works
2016 Dec 24
0
[PATCH] lib: Use a common function to validate strings.
...@@ -196,7 +181,7 @@ guestfs_int_appliance_command_line (guestfs_h *g, const char *appliance_dev,
guestfs_int_add_string (g, &argv, "guestfs_network=1");
/* TERM environment variable. */
- if (term && valid_term (term))
+ if (term && VALID_TERM (term))
guestfs_int_add_sprintf (g, &argv, "TERM=%s", term);
else
guestfs_int_add_string (g, &argv, "TERM=linux");
diff --git a/src/drives.c b/src/drives.c
index 1e04f81..594f019 100644
--- a/src/drives.c
+++ b/src/drives.c
@@ -588,65 +588,22 @@ guestfs_int_free_drives (guestfs_h *g)
* Check...
2016 Dec 24
2
[PATCH] lib: Use a common function to validate strings.
As discussed in the thread on validating $TERM, it would be good to
have a common function to do this. This is such a function.
The main advantage is it includes unit tests which the previous
functions did not.
Rich.
2015 Oct 05
0
[PATCH 2/2] Fix whitespace.
...fine ADD_CMDLINE(str) \
guestfs_int_add_string (g, &cmdline, (str))
-#define ADD_CMDLINE_STRING_NODUP(str) \
+#define ADD_CMDLINE_STRING_NODUP(str) \
guestfs_int_add_string_nodup (g, &cmdline, (str))
-#define ADD_CMDLINE_PRINTF(fs,...) \
+#define ADD_CMDLINE_PRINTF(fs,...) \
guestfs_int_add_sprintf (g, &cmdline, (fs), ##__VA_ARGS__)
ADD_CMDLINE (g->hv);
@@ -615,7 +615,7 @@ launch_direct (guestfs_h *g, void *datav, const char *arg)
if (!has_kvm || force_tcg)
flags |= APPLIANCE_COMMAND_LINE_IS_TCG;
ADD_CMDLINE_STRING_NODUP (guestfs_int_appliance_command_line (g, appliance...
2017 Jul 14
0
[PATCH 19/27] daemon: Reimplement ‘list_filesystems’ API in the daemon, in OCaml.
...- struct guestfs_btrfssubvolume *this = &vols->val[i];
-
- /* Ignore the default subvolume. We get it by simply mounting
- * the whole device of this btrfs filesystem.
- */
- if (this->btrfssubvolume_id == (uint64_t) default_volume)
- continue;
-
- guestfs_int_add_sprintf (g, sb,
- "btrfsvol:%s/%s",
- device, this->btrfssubvolume_path);
- guestfs_int_add_string (g, sb, "btrfs");
- }
-
- v = vfs_type;
- }
- else {
- /* Ignore all "*_member" strings. In libblkid these are returned
- * for things w...
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.
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 Apr 27
4
[PATCH 0/4] common: Add a simple mini-library for handling qemu command and config files.
Currently we have an OCaml library for generating the qemu command
line (used only by ‘virt-v2v -o qemu’). However we also generate a
qemu command line in ‘lib/launch-direct.c’, and we might in future
need to generate a ‘-readconfig’-compatible configuration file if we
want to go beyond 10,000 drives for scalability testing.
Therefore this patch series reimplements the qemu command line code as
2017 Jun 05
19
[PATCH v3 00/19] Allow APIs to be implemented in OCaml.
v2 was here:
https://www.redhat.com/archives/libguestfs/2017-June/msg00008.html
This series gets as far as a working (and faster) reimplementation of
‘guestfs_list_filesystems’.
I also have another patch series on top of this one which reimplements
the inspection APIs inside the daemon, but that needs a bit more work
still, since inspection turns out to be a very large piece of code.
Rich.
2017 Jul 27
23
[PATCH v3 00/23] Reimplement many daemon APIs in OCaml.
I think this fixes everything mentioned:
- Added the Optgroups module as suggested.
- Remove command temporary files.
- Replace command ~flags with ?fold_stdout_on_stderr.
- Nest _with_mounted function.
- Rebase & retest.
Rich.
2017 Jul 21
27
[PATCH v2 00/23] Reimplement many daemon APIs in OCaml.
v1 was posted here:
https://www.redhat.com/archives/libguestfs/2017-July/msg00098.html
This series now depends on two small patches which I posted separately:
https://www.redhat.com/archives/libguestfs/2017-July/msg00207.html
https://www.redhat.com/archives/libguestfs/2017-July/msg00209.html
v1 -> v2:
- Previously changes to generator/daemon.ml were made incrementally
through the patch
2017 Jul 14
45
[PATCH 00/27] Reimplement many daemon APIs in OCaml.
Previously posted as part of the mega utilities/inspection
series here:
https://www.redhat.com/archives/libguestfs/2017-June/msg00232.html
What I've done is to extract just the parts related to rewriting
daemon APIs in OCaml, rebase them on top of the current master, fix a
few things, and recompile and test everything.
Rich.
2017 Jun 12
32
[PATCH v5 00/32] Refactor utilities, implement some APIs in OCaml.
This is a combination of:
https://www.redhat.com/archives/libguestfs/2017-June/msg00046.html
[PATCH 00/12] Refactor utility functions.
plus:
https://www.redhat.com/archives/libguestfs/2017-June/msg00023.html
[PATCH v3 00/19] Allow APIs to be implemented in OCaml.
with the second patches rebased on top of the utility refactoring, and
some other adjustments and extensions.
This passes