search for: check_architectur

Displaying 20 results from an estimated 36 matches for "check_architectur".

Did you mean: check_architecture
2014 Sep 23
1
[PATCH] inspect: map Hurd devices, and enable fstab introspection
...\d+)\\.(\\d+)(\\.(\\d+))?", 0); + COMPILE (re_hurd_dev, "^/dev/(h)d(\\d+)s(\\d+)$", 0); } static void @@ -170,6 +172,7 @@ free_regexps (void) pcre_free (re_sles_version); pcre_free (re_sles_patchlevel); pcre_free (re_minix); + pcre_free (re_hurd_dev); } static void check_architecture (guestfs_h *g, struct inspect_fs *fs); @@ -776,7 +779,11 @@ guestfs___check_hurd_root (guestfs_h *g, struct inspect_fs *fs) /* Determine the architecture. */ check_architecture (g, fs); - /* XXX Check for /etc/fstab. */ + if (guestfs_is_file (g, "/etc/fstab") > 0) { + con...
2014 Sep 22
1
[PATCH] inspect: basic Minix support
...CHLEVEL = (\\d+)", 0); + COMPILE (re_minix, "^(\\d+)\\.(\\d+)(\\.(\\d+))?", 0); } static void @@ -167,6 +169,7 @@ free_regexps (void) pcre_free (re_opensuse_version); pcre_free (re_sles_version); pcre_free (re_sles_patchlevel); + pcre_free (re_minix); } static void check_architecture (guestfs_h *g, struct inspect_fs *fs); @@ -782,6 +785,48 @@ guestfs___check_hurd_root (guestfs_h *g, struct inspect_fs *fs) return 0; } +/* The currently mounted device is maybe to be a Minix root. */ +int +guestfs___check_minix_root (guestfs_h *g, struct inspect_fs *fs) +{ + fs->type =...
2016 Mar 30
2
[PATCH] inspect: use os-release for CoreOS
...S_FILE_OPTS_FOLLOWSYMLINKS, 1, -1) > 0) { r = parse_lsb_release (g, fs, "/share/coreos/lsb-release"); @@ -1062,6 +1074,8 @@ guestfs_int_check_coreos_usr (guestfs_h *g, struct inspect_fs *fs) return -1; } + skip_release_checks:; + /* Determine the architecture. */ check_architecture (g, fs); -- 2.5.5
2016 Jan 26
2
[PATCH] inspect: Get architecture of Alpine Linux from /bin/busybox.
...symlink) to find the architecture. --- src/inspect-fs-unix.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/inspect-fs-unix.c b/src/inspect-fs-unix.c index f915e86..6aaf5a1 100644 --- a/src/inspect-fs-unix.c +++ b/src/inspect-fs-unix.c @@ -1077,7 +1077,8 @@ static void check_architecture (guestfs_h *g, struct inspect_fs *fs) { const char *binaries[] = - { "/bin/bash", "/bin/ls", "/bin/echo", "/bin/rm", "/bin/sh" }; + { "/bin/bash", "/bin/ls", "/bin/echo", "/bin/rm", "/bin/sh&qu...
2016 Dec 06
3
[PATCH 1/2] inspect: fstab: Canonicalize paths appearing in fstab.
For example, converts "///usr//local//" -> "/usr/local". --- 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
2016 Jan 26
1
[PATCH] inspect: resolve symlinks when detecting architecture
...bin are symlinks to busybox. --- src/inspect-fs-unix.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/src/inspect-fs-unix.c b/src/inspect-fs-unix.c index f915e86..75c76f8 100644 --- a/src/inspect-fs-unix.c +++ b/src/inspect-fs-unix.c @@ -1082,10 +1082,22 @@ check_architecture (guestfs_h *g, struct inspect_fs *fs) char *arch; for (i = 0; i < sizeof binaries / sizeof binaries[0]; ++i) { - if (guestfs_is_file (g, binaries[i]) > 0) { - /* Ignore errors from file_architecture call. */ + /* Allow symlinks when checking the binaries:,so in case they a...
2018 Feb 14
1
[PATCH] inspect: use check_tests also for detecting Hurd
...N in - ignore (parse_generic distro "/etc/debian_version" data) - ); - (* Arch Hurd also exists, but inconveniently it doesn't have - * the normal /etc/arch-release file. XXX - *) + check_tests data linux_root_tests; (* Determine the architecture. *) data.arch <- check_architecture (); -- 2.14.3
2014 Dec 02
0
[PATCH 2/5] inspect_os: Add support for detecting OpenBSD
...XP (re_hurd_dev, "^/dev/(h)d(\\d+)s(\\d+)$", 0) +COMPILE_REGEXP (re_openbsd, "^OpenBSD (\\d+|\\?)\\.(\\d+|\\?)", 0) +COMPILE_REGEXP (re_openbsd_duid, "^[0-9a-f]{16}\\.[a-z]", 0) +COMPILE_REGEXP (re_openbsd_dev, "^/dev/(s|w)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); @@ -659,6 +662,55 @@ guestfs___check_netbsd_root (guestfs_h *g, struct inspect_fs *fs) return 0; } +/* The currently mounted device may be an OpenBSD root. */ +int +guestfs___check_o...
2014 Dec 03
1
[PATCH 1/4] inspect_os: Add support for detecting OpenBSD
...XP (re_hurd_dev, "^/dev/(h)d(\\d+)s(\\d+)$", 0) +COMPILE_REGEXP (re_openbsd, "^OpenBSD (\\d+|\\?)\\.(\\d+|\\?)", 0) +COMPILE_REGEXP (re_openbsd_duid, "^[0-9a-f]{16}\\.[a-z]", 0) +COMPILE_REGEXP (re_openbsd_dev, "^/dev/(s|w)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); @@ -659,6 +662,55 @@ guestfs___check_netbsd_root (guestfs_h *g, struct inspect_fs *fs) return 0; } +/* The currently mounted device may be an OpenBSD root. */ +int +guestfs___check_o...
2015 Sep 08
1
[PATCH] inspect: recognize the Frugalware distribution
...)d([0-9])([a-z])$", 0) COMPILE_REGEXP (re_netbsd_dev, "^/dev/(l|s)d([0-9])([a-z])$", 0) COMPILE_REGEXP (re_altlinux, " (?:(\\d+)(?:\\.(\\d+)(?:[\\.\\d]+)?)?)\\s+\\((?:[^)]+)\\)$", 0) +COMPILE_REGEXP (re_frugalware, "Frugalware (\\d+)\\.(\\d+)", 0) static void check_architecture (guestfs_h *g, struct inspect_fs *fs); static int check_hostname_unix (guestfs_h *g, struct inspect_fs *fs); @@ -632,6 +633,26 @@ guestfs_int_check_linux_root (guestfs_h *g, struct inspect_fs *fs) if (guestfs_int_parse_major_minor (g, fs) == -1) return -1; } + else if (guestfs_is_...
2017 Aug 09
0
[PATCH v12 09/11] daemon: Implement inspection of Linux and other Unix-like operating systems.
...then () (* true => finished *) + else check_tests data tests + ) else check_tests data tests + | [] -> () + +let rec check_linux_root mountable data = + let os_type = OS_TYPE_LINUX in + data.os_type <- Some os_type; + + check_tests data linux_root_tests; + + data.arch <- check_architecture (); + data.fstab <- + Inspect_fs_unix_fstab.check_fstab ~mdadm_conf:true mountable os_type; + data.hostname <- check_hostname_linux () + +and check_architecture () = + let rec loop = function + | [] -> None + | bin :: bins -> + (* Allow symlinks when checking the bina...
2017 Jul 31
0
[PATCH v11 08/10] daemon: Implement inspection of Linux and other Unix-like operating systems.
...: checking %s\n%!" release_file; + if Is.is_file ~followsymlinks:true release_file then ( + if parse_fun release_file data then () (* true => finished *) + else loop tests + ) else loop tests + | [] -> () + in + loop linux_root_tests; + + data.arch <- check_architecture (); + data.fstab <- + Inspect_fs_unix_fstab.check_fstab ~mdadm_conf:true mountable os_type; + data.hostname <- check_hostname_linux () + +and check_architecture () = + let rec loop = function + | [] -> None + | bin :: bins -> + (* Allow symlinks when checking the bina...
2015 Jun 02
1
[PATCH 2/3] inspection: Add support for CoreOS
..."/share/coreos/lsb-release", + GUESTFS_IS_FILE_OPTS_FOLLOWSYMLINKS, 1, -1) > 0) { + r = parse_lsb_release (g, fs, "/share/coreos/lsb-release"); + if (r == -1) /* error */ + return -1; + } + + /* Determine the architecture. */ + check_architecture (g, fs); + + /* CoreOS does not contain /etc/fstab to determine the mount points. + * Associate this filesystem with the "/usr" mount point. + */ + if (add_fstab_entry (g, fs, fs->mountable, "/usr") == -1) + return -1; + + return 0; +} + static void check_archite...
2015 May 29
2
[PATCH 2/3] inspection: Add support for CoreOS
..."/share/coreos/lsb-release", + GUESTFS_IS_FILE_OPTS_FOLLOWSYMLINKS, 1, -1) > 0) { + r = parse_lsb_release (g, fs, "/share/coreos/lsb-release"); + if (r == -1) /* error */ + return -1; + } + + /* Determine the architecture. */ + check_architecture (g, fs); + + /* CoreOS does not contain /etc/fstab to determine the mount points. + * Associate this filesystem with the "/usr" mount point. + */ + if (add_fstab_entry (g, fs, fs->mountable, "/usr") == -1) + return -1; + + return 0; +} + static void check_archite...
2011 Oct 13
9
[PATCH 1/9] Partially fix --disable-erlang
From: Michael Scherer <misc at zarb.org> Without this, configure will always enable erlang, no matter what argument are passed. Now, we can disable it, even if configure still need the erlang compiler for some obscure reason. --- configure.ac | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index 337a3ed..e0bed2f 100644 ---
2016 Mar 30
0
Re: [PATCH] inspect: use os-release for CoreOS
...> r = parse_lsb_release (g, fs, "/share/coreos/lsb-release"); > @@ -1062,6 +1074,8 @@ guestfs_int_check_coreos_usr (guestfs_h *g, struct inspect_fs *fs) > return -1; > } > > + skip_release_checks:; > + > /* Determine the architecture. */ > check_architecture (g, fs); Seems OK. Would like to hear what Nikos says. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com Fedora Windows cross-compiler. Compile Windows programs, test, and build Windows...
2014 Dec 03
0
[PATCH 2/4] Support fstab block device resolution for NetBSD
...e_openbsd, "^OpenBSD (\\d+|\\?)\\.(\\d+|\\?)", 0) COMPILE_REGEXP (re_openbsd_duid, "^[0-9a-f]{16}\\.[a-z]", 0) COMPILE_REGEXP (re_openbsd_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 *m...
2016 Mar 31
1
Re: [PATCH] inspect: use os-release for CoreOS
...(g, fs, "/share/coreos/lsb-release"); >> @@ -1062,6 +1074,8 @@ guestfs_int_check_coreos_usr (guestfs_h *g, struct inspect_fs *fs) >> return -1; >> } >> >> + skip_release_checks:; >> + >> /* Determine the architecture. */ >> check_architecture (g, fs); > Seems OK. Would like to hear what Nikos says. > > Rich. >
2014 Dec 02
0
[PATCH 3/5] Support fstab block device resolution for NetBSD
...e_openbsd, "^OpenBSD (\\d+|\\?)\\.(\\d+|\\?)", 0) COMPILE_REGEXP (re_openbsd_duid, "^[0-9a-f]{16}\\.[a-z]", 0) COMPILE_REGEXP (re_openbsd_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 *m...
2016 Dec 06
0
[PATCH 5/5] inspect: gather info from /usr filesystems as well (RHBZ#1401474)
...{ + r = parse_os_release (g, fs, "/lib/os-release"); + if (r == -1) /* error */ + return -1; + if (r == 1) /* ok - detected the release from this file */ + goto skip_release_checks; + } + + skip_release_checks:; + + /* Determine the architecture. */ + check_architecture (g, fs); + + return 0; +} + /* The currently mounted device is known to be a FreeBSD root. */ int guestfs_int_check_freebsd_root (guestfs_h *g, struct inspect_fs *fs) diff --git a/src/inspect-fs.c b/src/inspect-fs.c index 1951678..9f7630b 100644 --- a/src/inspect-fs.c +++ b/src/inspect-fs.c @@...