Displaying 20 results from an estimated 71 matches for "guestfs_aug_get".
2011 Nov 24
2
[PATCH] NFC: Cleanup iteration over fstab entries in inspect_fs_unix.c
...i;
- char augpath[256];
- for (i = 0; lines[i] != NULL; ++i) {
- /* Ignore comments. Only care about sequence lines which
- * match m{/\d+$}.
- */
- if (match (g, lines[i], re_aug_seq)) {
- snprintf (augpath, sizeof augpath, "%s/spec", lines[i]);
- char *spec = guestfs_aug_get (g, augpath);
- if (spec == NULL) goto error;
-
- snprintf (augpath, sizeof augpath, "%s/file", lines[i]);
- char *mp = guestfs_aug_get (g, augpath);
- if (mp == NULL) {
- free (spec);
- goto error;
- }
+ for (char **entry = entries; *entry != NULL;...
2015 Oct 16
1
[PATCH] inspect: Include more information for augeas parse errors (RHBZ#1229119)
...figfiles[i]);
+
+ if (STREQ (*match, errorpath)) {
+ /* Get the various error details. */
+ guestfs_push_error_handler (g, NULL, NULL);
+ CLEANUP_FREE char *messagepath =
+ safe_asprintf (g, "%s/message", errorpath);
+ CLEANUP_FREE char *message = guestfs_aug_get (g, messagepath);
+ CLEANUP_FREE char *linepath =
+ safe_asprintf (g, "%s/line", errorpath);
+ CLEANUP_FREE char *line = guestfs_aug_get (g, linepath);
+ CLEANUP_FREE char *charpath =
+ safe_asprintf (g, "%s/char", errorpath);
+ CLEA...
2016 Aug 25
1
[PATCH] inspection: Fix parsing of btrfs subvolumes in /etc/fstab.
...char **opt;
+ size_t i;
snprintf (augpath, sizeof augpath, "%s/opt", *entry);
CLEANUP_FREE_STRING_LIST char **opts = guestfs_aug_match (g, augpath);
if (opts == NULL) return -1;
- for (opt = opts; *opt; opt++) {
- CLEANUP_FREE char *optname = guestfs_aug_get (g, augpath);
+ for (i = 0; opts[i] != NULL; ++i) {
+ CLEANUP_FREE char *optname = NULL, *optvalue = NULL, *subvol = NULL;
+ char *old_mountable;
+
+ optname = guestfs_aug_get (g, opts[i]);
if (optname == NULL) return -1;
if (STREQ (optname, "subvo...
2012 Sep 20
1
[PATCH] rename local variable to avoid clash with match macro
...= NULL; match++) {
+ for (char **_match = matches; *_match != NULL; _match++) {
/* Get device name and uuid for each array */
- char *dev_path = safe_asprintf(g, "%s/devicename", *match);
+ char *dev_path = safe_asprintf(g, "%s/devicename", *_match);
char *dev = guestfs_aug_get(g, dev_path);
free(dev_path);
if (!dev) goto error;
- char *uuid_path = safe_asprintf(g, "%s/uuid", *match);
+ char *uuid_path = safe_asprintf(g, "%s/uuid", *_match);
char *uuid = guestfs_aug_get(g, uuid_path);
free(uuid_path);
if (!uuid) {
--
1...
2015 Mar 16
0
[PATCH] inspection: add support for systemd .mount files
...for (entry = entries; *entry != NULL; entry++) {
+ CLEANUP_FREE char *spec = NULL;
+ CLEANUP_FREE char *mp = NULL;
+ CLEANUP_FREE char *mountable = NULL;
+ CLEANUP_FREE char *vfstype = NULL;
+
+ snprintf (augpath, sizeof augpath, "%s/Mount/What/value", *entry);
+ spec = guestfs_aug_get (g, augpath);
+ if (spec == NULL)
+ return -1;
+
+ /* Ignore /dev/fd (floppy disks) (RHBZ#642929) and CD-ROM drives.
+ *
+ * /dev/iso9660/FREEBSD_INSTALL can be found in FreeBSDs installation
+ * discs.
+ */
+ if ((STRPREFIX (spec, "/dev/fd") && c_isd...
2015 Mar 16
2
[PATCH] RFE: Inspection should support systemd mount units
Adds support for systemd .mount files, uses Augeas to extract mount points.
Fixes RHBZ#1113153.
Maros Zatko (1):
inspection: add support for systemd .mount files
src/inspect-fs-unix.c | 240 ++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 240 insertions(+)
--
1.9.3
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
2013 Feb 12
7
Remaining btrfs patches
[PATCH 1/7] mount: Add mount_vfs_nochroot
This is significantly reworked from before. umount is gone as
discussed, and variable motion is minimised.
[PATCH 2/7] btrfs: Update btrfs_subvolume_list to take
Already provisionally ACKed. Previous comment was that cleanup could
be tidier. I looked into creating a new cleanup function for fs_buf,
but it isn't possible (or simple, anyway) in this
2011 Nov 23
8
[PATCH 0/8] Add MD inspection support to libguestfs
This series fixes inspection in the case that fstab contains references to md
devices. I've made a few changes since the previous posting, which I've
summarised below.
[PATCH 1/8] build: Create an MD variant of the dummy Fedora image
I've double checked that no timestamp is required in the Makefile. The script
will not run a second time to build fedora-md2.img.
[PATCH 2/8] build:
2011 Dec 01
2
[PATCH 0/2] handle MD devices in fstab
Only change from previous post is explicitly checking md_map for NULL before
hash_free and lookup.
2011 Nov 25
2
[PATCH 0/2] MD device inspection
These patches are rebased on top of current master. In addition, I've made the
following changes:
* Fixed whitespace error.
* Functions return -1 on error.
* Added a debug message when guest contains md devices, but nothing was parsed
from mdadm.conf.
2015 May 26
6
[PATCH 0/6] Update the way that API versions are generated for the man page.
The existing mechanism was clunky, slow and used ~ 10 MB of
local disk.
Rich.
2011 Dec 02
3
[PATCH 1/3] build: Add more suppressions for valgrind tests
---
extratests/suppressions | 20 ++++++++++++++++----
1 files changed, 16 insertions(+), 4 deletions(-)
diff --git a/extratests/suppressions b/extratests/suppressions
index 97d4b78..78ca4ab 100644
--- a/extratests/suppressions
+++ b/extratests/suppressions
@@ -3,19 +3,19 @@
Memcheck:Cond
fun:*
fun:numa_node_size64
- fun:numa_init
+ obj:/usr/lib64/libnuma.so.1
}
{
2013 Feb 07
12
[PATCH 01/12] generator: Add new Mountable argument type
This type is initially identical to Device.
---
generator/bindtests.ml | 2 +-
generator/c.ml | 7 +++++--
generator/csharp.ml | 6 ++++--
generator/daemon.ml | 4 ++--
generator/erlang.ml | 6 +++---
generator/fish.ml | 8 ++++----
generator/gobject.ml | 11 ++++++-----
generator/haskell.ml | 11 +++++++----
generator/java.ml | 10 +++++-----
2010 Aug 02
5
[PATCH v3 0/5] Inspection code in C
The first three patches were posted previously:
https://www.redhat.com/archives/libguestfs/2010-July/msg00082.html
The last two patches in this series change guestfish -i to use
this new code.
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming blog: http://rwmj.wordpress.com
Fedora now supports 80 OCaml packages (the OPEN alternative to
2010 Jul 29
4
[PATCH 0/3] Inspection code in C
These three patches (two were previously posted) can do simple
operating system inspection in C.
Example of use:
><fs> add-ro rhel55.img
><fs> run
><fs> inspect-os
/dev/VolGroup00/LogVol00
><fs> inspect-get-type /dev/VolGroup00/LogVol00
linux
><fs> inspect-get-distro /dev/VolGroup00/LogVol00
rhel
><fs> inspect-get-arch
2010 Aug 17
8
[PATCH v4 0/8] Inspection code in C
Previously discussed here:
https://www.redhat.com/archives/libguestfs/2010-August/msg00002.html
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine. Supports Linux and Windows.
http://et.redhat.com/~rjones/virt-df/
2017 Jul 21
10
[PATCH v10 00/10] Reimplement inspection in the daemon.
v9 was here:
https://www.redhat.com/archives/libguestfs/2017-July/msg00139.html
This depends on these three series (the first two being single minor
patches):
https://www.redhat.com/archives/libguestfs/2017-July/msg00207.html
https://www.redhat.com/archives/libguestfs/2017-July/msg00209.html
https://www.redhat.com/archives/libguestfs/2017-July/msg00215.html
There is no substantive change. I
2017 Jul 17
12
[PATCH v9 00/11] Reimplement inspection in the daemon.
This depends on the patch series
"[PATCH 00/27] Reimplement many daemon APIs in OCaml."
(https://www.redhat.com/archives/libguestfs/2017-July/msg00098.html)
v8 was posted here:
https://www.redhat.com/archives/libguestfs/2017-June/msg00274.html
v9:
- I split up the mega-patch into a more reviewable series of
smaller, incremental patches.
There are some other changes vs v8, but
2017 Aug 09
16
[PATCH v12 00/11] Reimplement inspection in the daemon.
This fixes almost everything. Note that it adds an extra commit which
fixes the whole utf8/iconv business.
It's probably better to list what isn't fixed:
(1) I didn't leave the osinfo code around because I'm still haven't
looked too closely at virt-builder-repository. Can't we just fetch
this code from the git history when we need it?
(2) I didn't change the way