Displaying 20 results from an estimated 43 matches for "check_fstab".
2011 Nov 23
8
[PATCH 0/8] Add MD inspection support to libguestfs
...Nothing under images/ should be translated
[PATCH 3/8] NFC: Declare and use variables on the same line in
[PATCH 4/8] md: Inspect MD devices
I separated this, as it's potentially independently useful. I've also split out
the NFs as requested.
[PATCH 5/8] NFC: Consolidate the error path in check_fstab in
[PATCH 6/8] NFC: Allow multiple config files in inspect_with_augeas
[PATCH 7/8] inspection: Handle MD devices in fstab
* Split out the NFCs
* Changed warning() to debug() in all cases
* Following the pattern of other code, I have:
* Not called error() when failure is due to the error return of...
2018 Sep 11
1
[PATCH] daemon: consider /etc/mdadm/mdadm.conf while inspecting mountpoints.
...ons(-)
diff --git a/daemon/inspect_fs_unix_fstab.ml b/daemon/inspect_fs_unix_fstab.ml
index 170440d2c..9d54dadda 100644
--- a/daemon/inspect_fs_unix_fstab.ml
+++ b/daemon/inspect_fs_unix_fstab.ml
@@ -38,14 +38,15 @@ let re_xdev = PCRE.compile "^/dev/(h|s|v|xv)d([a-z]+)(\\d*)$"
let rec check_fstab ?(mdadm_conf = false) (root_mountable : Mountable.t)
os_type =
- let configfiles =
- "/etc/fstab" :: if mdadm_conf then ["/etc/mdadm.conf"] else [] in
+ let mdadmfiles =
+ if mdadm_conf then ["/etc/mdadm.conf"; "/etc/mdadm/mdadm.conf&q...
2014 Dec 03
0
[PATCH 2/4] Support fstab block device resolution for NetBSD
...d_dev, "^/dev/(s|w)d([0-9])([a-z])$", 0)
+COMPILE_REGEXP (re_netbsd_dev, "^/dev/(l|s)d([0-9])([a-z])$", 0)
static void check_architecture (guestfs_h *g, struct inspect_fs *fs);
static int check_hostname_unix (guestfs_h *g, struct inspect_fs *fs);
@@ -92,7 +93,8 @@ static int check_fstab (guestfs_h *g, struct inspect_fs *fs);
static int add_fstab_entry (guestfs_h *g, struct inspect_fs *fs,
const char *mountable, const char *mp);
static char *resolve_fstab_device (guestfs_h *g, const char *spec,
- Hash_table *md_map);...
2014 Dec 02
0
[PATCH 3/5] Support fstab block device resolution for NetBSD
...d_dev, "^/dev/(s|w)d([0-9])([a-z])$", 0)
+COMPILE_REGEXP (re_netbsd_dev, "^/dev/(l|s)d([0-9])([a-z])$", 0)
static void check_architecture (guestfs_h *g, struct inspect_fs *fs);
static int check_hostname_unix (guestfs_h *g, struct inspect_fs *fs);
@@ -92,7 +93,8 @@ static int check_fstab (guestfs_h *g, struct inspect_fs *fs);
static int add_fstab_entry (guestfs_h *g, struct inspect_fs *fs,
const char *mountable, const char *mp);
static char *resolve_fstab_device (guestfs_h *g, const char *spec,
- Hash_table *md_map);...
2016 Dec 06
3
[PATCH 1/2] inspect: fstab: Canonicalize paths appearing in fstab.
...ype os_type);
static int inspect_with_augeas (guestfs_h *g, struct inspect_fs *fs, const char **configfiles, int (*f) (guestfs_h *, struct inspect_fs *));
+static void canonical_mountpoint (char *mp);
/* Hash structure for uuid->path lookups */
typedef struct md_uuid {
@@ -1286,6 +1287,9 @@ check_fstab (guestfs_h *g, struct inspect_fs *fs)
if (mp == NULL)
return -1;
+ /* Canonicalize the path, so "///usr//local//" -> "/usr/local" */
+ canonical_mountpoint (mp);
+
/* Ignore certain mountpoints. */
if (STRPREFIX (mp, "/dev/") ||...
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 Jun 04
3
[PATCH] Use safe_realloc() in favor of realloc overall.
...a/src/inspect-fs-unix.c
+++ b/src/inspect-fs-unix.c
@@ -90,8 +90,8 @@ static int check_hostname_unix (guestfs_h *g, struct inspect_fs *fs);
static int check_hostname_redhat (guestfs_h *g, struct inspect_fs *fs);
static int check_hostname_freebsd (guestfs_h *g, struct inspect_fs *fs);
static int check_fstab (guestfs_h *g, struct inspect_fs *fs);
-static int add_fstab_entry (guestfs_h *g, struct inspect_fs *fs,
- const char *mountable, const char *mp);
+static void add_fstab_entry (guestfs_h *g, struct inspect_fs *fs,
+ const char *mountable, const...
2017 Feb 22
1
[PATCH] inspect: ignore /dev/cdN devices in /etc/fstab
...his is the same as done for
/dev/fdN devices, i.e. floppy devices.
---
lib/inspect-fs-unix.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/inspect-fs-unix.c b/lib/inspect-fs-unix.c
index 7e940d6..9b6bfbf 100644
--- a/lib/inspect-fs-unix.c
+++ b/lib/inspect-fs-unix.c
@@ -1305,6 +1305,7 @@ check_fstab (guestfs_h *g, struct inspect_fs *fs)
* discs.
*/
if ((STRPREFIX (spec, "/dev/fd") && c_isdigit (spec[7])) ||
+ (STRPREFIX (spec, "/dev/cd") && c_isdigit (spec[7])) ||
STREQ (spec, "/dev/floppy") ||
STREQ (spec,...
2014 Dec 03
1
[PATCH 1/4] inspect_os: Add support for detecting OpenBSD
...} else {
+ return -1;
+ }
+
+ /* Determine the architecture. */
+ check_architecture (g, fs);
+
+ /* We already know /etc/fstab exists because it's part of the test above. */
+ const char *configfiles[] = { "/etc/fstab", NULL };
+ if (inspect_with_augeas (g, fs, configfiles, check_fstab) == -1)
+ return -1;
+
+ /* Determine hostname. */
+ if (check_hostname_unix (g, fs) == -1)
+ return -1;
+
+ return 0;
+}
+
/* The currently mounted device may be a Hurd root. Hurd has distros
* just like Linux.
*/
@@ -821,6 +873,18 @@ check_hostname_unix (guestfs_h *g, struct inspec...
2015 Mar 16
0
[PATCH] inspection: add support for systemd .mount files
...snprintf (filenames[idx], entry_len, "%s%s", *dir, *entry);
+ ++idx;
+ }
+ }
+ filenames[idx] = NULL;
+
+ if (inspect_with_augeas2 (g, fs,
+ (const char**) filenames, check_systemd_mnt) == -1) {
+ return -1;
+ }
+ }
+
+ return 0;
+}
+
+static int
check_fstab (guestfs_h *g, struct inspect_fs *fs)
{
CLEANUP_FREE_STRING_LIST char **entries = NULL;
@@ -1705,6 +1885,66 @@ static char *make_augeas_path_expression (guestfs_h *g, const char **configfiles
* to 'f' the Augeas handle is closed.
*/
static int
+inspect_with_augeas2 (guestfs_h *g, s...
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
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.
2014 Sep 23
1
[PATCH] inspect: map Hurd devices, and enable fstab introspection
...inspect_fs *fs)
/* Determine the architecture. */
check_architecture (g, fs);
- /* XXX Check for /etc/fstab. */
+ if (guestfs_is_file (g, "/etc/fstab") > 0) {
+ const char *configfiles[] = { "/etc/fstab", NULL };
+ if (inspect_with_augeas (g, fs, configfiles, check_fstab) == -1)
+ return -1;
+ }
/* Determine hostname. */
if (check_hostname_unix (g, fs) == -1)
@@ -1635,6 +1642,22 @@ resolve_fstab_device (guestfs_h *g, const char *spec, Hash_table *md_map)
if (r == -1)
return NULL;
}
+ else if (match3 (g, spec, re_hurd_dev, &type, &a...
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
}
{
2011 Nov 22
2
[PATCH] inspection: Handle MD devices in fstab
This patch fixes inspection when fstab contains devices md devices
specified as /dev/mdN. The appliance creates these devices without reference to
the guest's mdadm.conf so, for e.g. /dev/md0 in the guest will often be created
as /dev/md127 in the appliance. With this patch, we match the uuids of detected
md devices against uuids specified in mdadm.conf, and map them appropriately
when we
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)
*
2014 Dec 02
0
[PATCH 2/5] inspect_os: Add support for detecting OpenBSD
...} else {
+ return -1;
+ }
+
+ /* Determine the architecture. */
+ check_architecture (g, fs);
+
+ /* We already know /etc/fstab exists because it's part of the test above. */
+ const char *configfiles[] = { "/etc/fstab", NULL };
+ if (inspect_with_augeas (g, fs, configfiles, check_fstab) == -1)
+ return -1;
+
+ /* Determine hostname. */
+ if (check_hostname_unix (g, fs) == -1)
+ return -1;
+
+ return 0;
+}
+
/* The currently mounted device may be a Hurd root. Hurd has distros
* just like Linux.
*/
@@ -821,6 +873,18 @@ check_hostname_unix (guestfs_h *g, struct inspec...
2011 Nov 24
2
[PATCH] NFC: Cleanup iteration over fstab entries in inspect_fs_unix.c
...^(/dev/md\\d+)$", 0);
@@ -132,7 +131,6 @@ free_regexps (void)
pcre_free (re_scientific_linux);
pcre_free (re_scientific_linux_no_minor);
pcre_free (re_major_minor);
- pcre_free (re_aug_seq);
pcre_free (re_xdev);
pcre_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/et...
2014 Oct 10
5
missing btrfs subvol support
Is btrfs subvol support failing just for me? Looks like nothing adds the
required '@/' string. virt-ls uses the first variant of the command:
><rescue> mount -vo subvol=var/spool,ro /dev/sda2 /sysroot/
[ 113.852047] BTRFS info (device sda2): disk space caching is enabled
[ 113.852869] BTRFS: has skinny extents
mount: mount(2) failed: No such file or directory
><rescue>
2016 Aug 25
1
[PATCH] inspection: Fix parsing of btrfs subvolumes in /etc/fstab.
.../libguestfs/+bug/1615337
---
src/inspect-fs-unix.c | 21 +++++++++++----------
1 file changed, 11 insertions(+), 10 deletions(-)
diff --git a/src/inspect-fs-unix.c b/src/inspect-fs-unix.c
index 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...