Displaying 20 results from an estimated 48 matches for "augpath".
2011 Nov 24
2
[PATCH] NFC: Cleanup iteration over fstab entries in inspect_fs_unix.c
...free (re_cciss);
pcre_free (re_mdN);
@@ -725,47 +723,43 @@ check_fstab (guestfs_h *g, struct inspect_fs *fs)
Hash_table *md_map;
if (!map_md_devices (g, &md_map)) return -1;
- char **lines = guestfs_aug_ls (g, "/files/etc/fstab");
- if (lines == NULL) goto error;
+ char *augpath = NULL;
+ char **entries = guestfs_aug_match (g, "/files/etc/fstab/*"
+ "[label() != '#comment']");
+ if (entries == NULL) goto error;
- if (lines[0] == NULL) {
+ if (entries[0] == NULL) {
error (g, _("could not par...
2015 Mar 16
0
[PATCH] inspection: add support for systemd .mount files
...) == -1)
+ return -1;
+
return 0;
}
@@ -981,6 +987,180 @@ check_hostname_freebsd (guestfs_h *g, struct inspect_fs *fs)
}
static int
+check_systemd_mnt (guestfs_h *g, struct inspect_fs *fs, const char *fname)
+{
+ CLEANUP_FREE_STRING_LIST char **entries = NULL;
+ char **entry;
+ char augpath[256];
+ CLEANUP_HASH_FREE Hash_table *md_map = NULL;
+ bool is_bsd = (fs->type == OS_TYPE_FREEBSD ||
+ fs->type == OS_TYPE_NETBSD ||
+ fs->type == OS_TYPE_OPENBSD);
+
+ /* Generate a map of MD device paths listed in /etc/mdadm.conf to MD device
+ * path...
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
2016 Aug 25
1
[PATCH] inspection: Fix parsing of btrfs subvolumes in /etc/fstab.
...ndex cc0e6b1..0c34701 100644
--- a/src/inspect-fs-unix.c
+++ b/src/inspect-fs-unix.c
@@ -1347,27 +1347,28 @@ check_fstab (guestfs_h *g, struct inspect_fs *fs)
if (vfstype == NULL) return -1;
if (STREQ (vfstype, "btrfs")) {
- 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] !=...
2010 Apr 12
1
[PATCH] Converter: Update xvc0 console to ttyS0
...configure_kernel_modules($guestos, $desc, $virtio);
@@ -193,6 +194,51 @@ sub _configure_kernel_modules
}
}
+# We configure a console on ttyS0. Make sure existing console references use it.
+sub _configure_console
+{
+ my ($g) = @_;
+
+ # Look for gettys which use xvc0
+ foreach my $augpath ($g->aug_match("/files/etc/inittab/*/process")) {
+ my $proc = $g->aug_get($augpath);
+
+ # If the process mentions xvc0, change it to ttyS0
+ if ($proc =~ /\bxvc0\b/) {
+ $proc =~ s/\bxvc0\b/ttyS0/g;
+ $g->aug_set($augpath, $proc);
+...
2011 Jan 20
1
[PATCH] Fix detection of an existing grub entry
...eck_grub
{
my ($version, $kernel, $g, $desc) = @_;
+ my $grubfs = $desc->{boot}->{grub_fs};
+ my $prefix = $grubfs eq '/boot' ? '' : '/boot';
+
# Nothing to do if there's already a grub entry
- eval {
+ return if eval {
foreach my $augpath
($g->aug_match('/files/boot/grub/menu.lst/title/kernel'))
{
- return if ($g->aug_get($augpath) eq $kernel);
+ return 1 if ($grubfs.$g->aug_get($augpath) eq $kernel);
}
+
+ return 0
};
augeas_error($g, $@) if ($@)...
2012 Jan 06
1
virt-v2v should add kernel console= to Xen->KVM converted guest's grub.conf
...39;t go to the virsh console, although a getty does get
started and securetty is updated correctly.
I'd like to propose that the converter add such kernel console=
arguments if it doesn't find any to replace. Here is the current
code:
# Update any kernel console lines
foreach my $augpath
($g->aug_match("/files$grub_conf/title/kernel/console"))
{
my $console = $g->aug_get($augpath);
if ($console =~ /\b(x|h)vc0\b/) {
$console =~ s/\b(x|h)vc0\b/ttyS0/g;
$g->aug_set($augpath, $console);
}
}
I'd imag...
2010 Oct 13
1
[PATCH] Use augeas to update securetty
...x.pm
index b2eb774..22aa03f 100644
--- a/lib/Sys/VirtV2V/Converter/Linux.pm
+++ b/lib/Sys/VirtV2V/Converter/Linux.pm
@@ -218,20 +218,14 @@ sub _configure_console
}
# Replace any mention of xvc0 or hvc0 in /etc/securetty with ttyS0
- my $size = 0;
- my @lines = ();
+ foreach my $augpath ($g->aug_match('/files/etc/securetty/*')) {
+ my $tty = $g->aug_get($augpath);
- foreach my $line ($g->read_lines('/etc/securetty')) {
- if($line eq "xvc0" || $line eq "hvc0") {
- $line = "ttyS0";
+ if($tty...
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
2010 Jul 28
5
RHEL 6 guest support
The following patches add RHEL 6 guest support to virt-v2v. This was actually
quite a lot easier than I expected.
* [PATCH 1/4] Update virt-v2v.conf for RHEL 6 virtio support
* [PATCH 2/4] Check kudzu exists before attempting to disable it
* [PATCH 3/4] Use dracut rather than mkinitrd if it's available
* [PATCH 4/4] Properly convert RHEL 6 guest console
2020 Mar 09
4
[PATCH v3 0/3] Switch augeas APIs to OCaml
This reimplements the augeas APIs using ocaml-augeas (dropping all the
C code).
The behaviour seems unchanged, although I may have not tested all the
various corner cases.
Changes from v2:
- dropped patch #1, as it was applied already (was a real bugfix)
- rebased on master
Pino Toscano (3):
Revert "Revert "daemon: implement OptString for OCaml APIs""
daemon: move augeas
2020 Jan 09
5
[PATCH v2 0/4] Switch augeas APIs to OCaml
This reimplements the augeas APIs using ocaml-augeas (dropping all the
C code).
The behaviour seems unchanged, although I may have not tested all the
various corner cases.
Pino Toscano (4):
daemon: fix/enhance error reporting of Augeas exceptions
Revert "Revert "daemon: implement OptString for OCaml APIs""
daemon: move augeas APIs to OCaml
daemon: drop usage of C
2013 Sep 24
0
[PATCH 3/4] Add SUSE converter
...el);
+ }
+ }
+
+ return @kernels;
+}
+
+sub update_console
+{
+ my $self = shift;
+ my ($remove) = @_;
+
+ my $g = $self->{g};
+ my $grub_conf = $self->{grub_conf};
+
+ eval {
+ # Update any kernel console lines
+ my $deleted = 0;
+ foreach my $augpath
+ ($g->aug_match("/files$grub_conf/title/kernel/console"))
+ {
+ my $console = $g->aug_get($augpath);
+ if ($console =~ /\b(x|h)vc0\b/) {
+ if ($remove) {
+ $g->aug_defvar("delconsole$deleted", $a...
2019 May 30
5
[PATCH 0/5] RFC: switch augeas APIs to OCaml
This synchronizes the embedded ocaml-augeas copy, and reimplements the
augeas APIs using it (dropping all the C code).
The behaviour seems unchanged, although I may have not tested all the
various corner cases.
Pino Toscano (5):
common/mlaugeas: Synchronize with latest ocaml-augeas
daemon: fix/enhance error reporting of Augeas exceptions
Revert "Revert "daemon: implement
2013 Oct 03
2
[PATCH] virt-v2v: Convert RedHat.pm to Linux.pm - for SUSE support
...el);
+ }
+ }
+
+ return @kernels;
+}
+
+sub update_console
+{
+ my $self = shift;
+ my ($remove) = @_;
+
+ my $g = $self->{g};
+ my $grub_conf = $self->{grub_conf};
+
+ eval {
+ # Update any kernel console lines
+ my $deleted = 0;
+ foreach my $augpath
+ ($g->aug_match("/files$grub_conf/title/kernel/console"))
+ {
+ my $console = $g->aug_get($augpath);
+ if ($console =~ /\b(x|h)vc0\b/) {
+ if ($remove) {
+ $g->aug_defvar("delconsole$deleted", $a...
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 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 +++++-----
2012 Jan 12
1
Libguestfs gobject bindings
I'm currently working on gobject bindings for libguestfs. I haven't got
as far as compiling anything yet, but I've attached the C header for
initial review.
Matt
--
Matthew Booth, RHCA, RHCSS
Red Hat Engineering, Virtualisation Team
GPG ID: D33C3490
GPG FPR: 3733 612D 2D05 5458 8A8A 1600 3441 EA19 D33C 3490
-------------- next part --------------
An embedded and
2013 Nov 28
3
[PATCH 1/3] inspect: recognise Debian live images as such
Check for filesystem.squashfs also in /live, since it is where
live-build places it.
---
src/inspect-fs-cd.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/inspect-fs-cd.c b/src/inspect-fs-cd.c
index 407e4f8..eaeaa6f 100644
--- a/src/inspect-fs-cd.c
+++ b/src/inspect-fs-cd.c
@@ -429,7 +429,8 @@ guestfs___check_installer_root (guestfs_h *g, struct inspect_fs *fs)
*
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