search for: resolve_fstab_device

Displaying 20 results from an estimated 51 matches for "resolve_fstab_device".

2014 Dec 03
0
[PATCH 2/4] Support fstab block device resolution for NetBSD
...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); + Hash_table *md_map, + enum inspect_os_type os_type); static int inspect_with_augeas (guestfs_h *g, struct inspect_fs *fs, const char **con...
2014 Dec 02
0
[PATCH 3/5] Support fstab block device resolution for NetBSD
...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); + Hash_table *md_map, + enum inspect_os_type os_type); static int inspect_with_augeas (guestfs_h *g, struct inspect_fs *fs, const char **con...
2019 Jan 14
1
[PATCH] inspect: fix inspection of partition-less devices (RHBZ#1661038)
.../inspect_fs_unix_fstab.ml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/daemon/inspect_fs_unix_fstab.ml b/daemon/inspect_fs_unix_fstab.ml index 9f9478144..02956ae94 100644 --- a/daemon/inspect_fs_unix_fstab.ml +++ b/daemon/inspect_fs_unix_fstab.ml @@ -350,7 +350,7 @@ and resolve_fstab_device spec md_map os_type = debug_matching "xdev"; let typ = PCRE.sub 1 and disk = PCRE.sub 2 - and part = int_of_string (PCRE.sub 3) in + and part = PCRE.sub 3 in resolve_xdev typ disk part default ) @@ -467,7 +467,7 @@ and resolve_fstab_device spec md_map os_typ...
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.
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 Nov 03
2
[PATCH stable-1.24] Fix fstab block device resolution for FreeBSD
...,7 +145,8 @@ free_regexps (void) pcre_free (re_xdev); pcre_free (re_cciss); pcre_free (re_mdN); - pcre_free (re_freebsd); + pcre_free (re_freebsd_mbr); + pcre_free (re_freebsd_gpt); pcre_free (re_diskbyid); pcre_free (re_netbsd); pcre_free (re_opensuse); @@ -1464,13 +1467,30 @@ resolve_fstab_device (guestfs_h *g, const char *spec, Hash_table *md_map) free (disk); } - else if (match3 (g, spec, re_freebsd, &disk, &slice, &part)) { + else if (match3 (g, spec, re_freebsd_gpt, &type, &disk, &part)) { + /* If the FreeBSD disk contains GPT partitions, the trans...
2017 Nov 21
2
[PATCH REPOST 1/2] common/mlstdutils: Add return statement.
No change, just reposting without the "for discussion" tag. I think we should allow this as it seems like a nice coding style for a limited subset of imperative-style code. Rich.
2017 Nov 05
2
[PATCH 0/2] (mainly for discussion) Add ‘return’ statement.
When rewriting the heavily imperative original inspection code, I longed for a ‘return’ statement so I could keep the new code as close as possible to the original. OCaml of course does not have such a statement, but it's relatively simply to implement it in the language. The first patch does so, and the second patch rewrites a sample of the inspection code to use it. Rich.
2014 Dec 02
0
[PATCH 2/5] inspect_os: Add support for detecting OpenBSD
...e /dev/root to the current device. */ - mountable = safe_strdup (g, fs->mountable); + /* Ignore "/.swap" (Pardus) and pseudo-devices like "tmpfs". */ else if (STRPREFIX (spec, "/dev/")) /* Resolve guest block device names. */ mountable = resolve_fstab_device (g, spec, md_map); + else if (match (g, spec, re_openbsd_duid)) { + /* In OpenBSD's fstab you can specify partitions on a disk by appending a + * period and a partition letter to a Disklable Unique Identifier. The + * DUID is a 16 hex digit field found in the OpenBSD's a...
2014 Dec 03
1
[PATCH 1/4] inspect_os: Add support for detecting OpenBSD
...the / partition of the *BSD systems, since the + * BSD -> Linux device translation is not straight forward. + */ mountable = safe_strdup (g, fs->mountable); else if (STRPREFIX (spec, "/dev/")) /* Resolve guest block device names. */ mountable = resolve_fstab_device (g, spec, md_map); + else if (match (g, spec, re_openbsd_duid)) { + /* In OpenBSD's fstab you can specify partitions on a disk by appending a + * period and a partition letter to a Disklable Unique Identifier. The + * DUID is a 16 hex digit field found in the OpenBSD's a...
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:
2015 Mar 16
0
[PATCH] inspection: add support for systemd .mount files
...53. --- src/inspect-fs-unix.c | 240 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 240 insertions(+) diff --git a/src/inspect-fs-unix.c b/src/inspect-fs-unix.c index 2abbf24..6dfc299 100644 --- a/src/inspect-fs-unix.c +++ b/src/inspect-fs-unix.c @@ -96,6 +96,9 @@ static char *resolve_fstab_device (guestfs_h *g, const char *spec, Hash_table *md_map, enum inspect_os_type os_type); static int inspect_with_augeas (guestfs_h *g, struct inspect_fs *fs, const char **configfiles, int (*f) (guestfs_h *, struct inspect_fs *)); +...
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
2014 Sep 23
1
[PATCH] inspect: map Hurd devices, and enable fstab introspection
..._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, &disk, &part)) { + /* Hurd disk devices are like /dev/hdNsM, where hdN is the + * N-th disk and M is the M-th partition on that disk. +...
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
2016 Dec 06
3
[PATCH 1/2] inspect: fstab: Canonicalize paths appearing in fstab.
...ot;. --- src/inspect-fs-unix.c | 52 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/src/inspect-fs-unix.c b/src/inspect-fs-unix.c index a1a757c..0fea9c8 100644 --- a/src/inspect-fs-unix.c +++ b/src/inspect-fs-unix.c @@ -89,6 +89,7 @@ static char *resolve_fstab_device (guestfs_h *g, const char *spec, Hash_table *md_map, enum inspect_os_type os_type); static int inspect_with_augeas (guestfs_h *g, struct inspect_fs *fs, const char **configfiles, int (*f) (guestfs_h *, struct inspect_fs *)); +...
2013 Nov 05
2
[PATCH stable-1.24] Fix fstab block device resolution for FreeBSD
...3,7 +145,8 @@ free_regexps (void) pcre_free (re_xdev); pcre_free (re_cciss); pcre_free (re_mdN); - pcre_free (re_freebsd); + pcre_free (re_freebsd_mbr); + pcre_free (re_freebsd_gpt); pcre_free (re_diskbyid); pcre_free (re_netbsd); pcre_free (re_opensuse); @@ -1464,7 +1467,22 @@ resolve_fstab_device (guestfs_h *g, const char *spec, Hash_table *md_map) free (disk); } - else if (match3 (g, spec, re_freebsd, &disk, &slice, &part)) { + else if (match3 (g, spec, re_freebsd_gpt, &type, &disk, &part)) { + /* If the FreeBSD disk contains GPT partitions, the trans...
2016 Dec 07
3
[PATCH v2 0/2] Improve inspection of /usr filesystems
Hi, this patch series improves the way /usr filesystems are handled: tag them appropriately, so later on we can find them and merge results they contain directly back for the root filesystem. Changes in v2: - removed patches #1 and #2, already pushed - drop patch #3, no more needed - replace patch #4 with a better suggestion from Rich - change if into assert in patch #5 Thanks, Pino Toscano
2016 Dec 06
0
[PATCH 4/5] inspect: fix existance check of /dev/mapper devices
...09461aeb6850bb2e7b870a0a4c2f5edf. --- src/inspect-fs-unix.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/inspect-fs-unix.c b/src/inspect-fs-unix.c index c833304..7b54a4a 100644 --- a/src/inspect-fs-unix.c +++ b/src/inspect-fs-unix.c @@ -1806,6 +1806,19 @@ resolve_fstab_device_diskbyid (guestfs_h *g, const char *part, return 0; } +static bool +dev_mapper_exists (guestfs_h *g, const char *device) +{ + CLEANUP_FREE char *ret = NULL; + const char *const args[] = { device, NULL }; + + guestfs_push_error_handler (g, NULL, NULL); + ret = guestfs_debug (g, "exist...