search for: guestfs_is_file_opts

Displaying 20 results from an estimated 37 matches for "guestfs_is_file_opts".

2013 Jun 14
3
[PATCH 0/2] Fix inspection of Fedora guests (RHBZ#974489).
Here is a preliminary fix for this bug. I'm running the test suite on this now. Rich.
2015 May 29
1
[PATCH] inspection: fix CentOS 7 detection
...- /* Oracle Linux includes a "/etc/redhat-release" file, hence the Oracle check - * needs to be performed before the Red-Hat one. + /* RHEL-based distros include a "/etc/redhat-release" file, hence their + * checks need to be performed before the Red-Hat one. */ if (guestfs_is_file_opts (g, "/etc/oracle-release", GUESTFS_IS_FILE_OPTS_FOLLOWSYMLINKS, 1, -1) > 0) { @@ -376,6 +376,34 @@ guestfs_int_check_linux_root (guestfs_h *g, struct inspect_fs *fs) fs->minor_version = 0; } } + else if (guestfs_is_file_opts (g, "/et...
2016 Mar 30
2
[PATCH] inspect: use os-release for CoreOS
...else if (VALUE_IS ("debian")) distro = OS_DISTRO_DEBIAN; else if (VALUE_IS ("fedora")) @@ -1055,6 +1057,16 @@ guestfs_int_check_coreos_usr (guestfs_h *g, struct inspect_fs *fs) fs->type = OS_TYPE_LINUX; fs->distro = OS_DISTRO_COREOS; + + if (guestfs_is_file_opts (g, "/lib/os-release", + GUESTFS_IS_FILE_OPTS_FOLLOWSYMLINKS, 1, -1) > 0) { + r = parse_os_release (g, fs, "/lib/os-release"); + if (r == -1) /* error */ + return -1; + if (r == 1) /* ok - detected the release from this...
2016 Mar 30
0
Re: [PATCH] inspect: use os-release for CoreOS
...uot;)) > distro = OS_DISTRO_DEBIAN; > else if (VALUE_IS ("fedora")) > @@ -1055,6 +1057,16 @@ guestfs_int_check_coreos_usr (guestfs_h *g, struct inspect_fs *fs) > > fs->type = OS_TYPE_LINUX; > fs->distro = OS_DISTRO_COREOS; > + > + if (guestfs_is_file_opts (g, "/lib/os-release", > + GUESTFS_IS_FILE_OPTS_FOLLOWSYMLINKS, 1, -1) > 0) { > + r = parse_os_release (g, fs, "/lib/os-release"); > + if (r == -1) /* error */ > + return -1; > + if (r == 1) /* ok - detect...
2013 Dec 20
1
[PATCH] inspect: fix detection of newer CirrOS versions (RHBZ#1045450).
...-unix.c b/src/inspect-fs-unix.c index a9e5cad..c70960a 100644 --- a/src/inspect-fs-unix.c +++ b/src/inspect-fs-unix.c @@ -574,6 +574,18 @@ guestfs___check_linux_root (guestfs_h *g, struct inspect_fs *fs) return -1; } + /* CirrOS versions providing a own version file. + */ + else if (guestfs_is_file_opts (g, "/etc/cirros/version", + GUESTFS_IS_FILE_OPTS_FOLLOWSYMLINKS, 1, -1) > 0) { + fs->distro = OS_DISTRO_CIRROS; + + if (parse_release_file (g, fs, "/etc/cirros/version") == -1) + return -1; + + if (guestfs___parse_major_minor...
2016 May 18
0
[PATCH 2/2] inspect: switch to version struct for os major/minor version
...(g, major); + fs->version.v_major = guestfs_int_parse_unsigned_int (g, major); free (major); - if (fs->major_version == -1) + if (fs->version.v_major == -1) return -1; - fs->minor_version = 0; + fs->version.v_minor = 0; } } else if (guestfs_is_file_opts (g, "/etc/centos-release", @@ -536,23 +504,23 @@ guestfs_int_check_linux_root (guestfs_h *g, struct inspect_fs *fs) if (match2 (g, fs->product_name, re_centos_old, &major, &minor) || match2 (g, fs->product_name, re_centos, &major, &minor)) { - fs->ma...
2016 Jan 26
1
[PATCH] inspect: resolve symlinks when detecting architecture
...inaries[i]) > 0) { - /* Ignore errors from file_architecture call. */ + /* Allow symlinks when checking the binaries:,so in case they are + * relative ones (which can be resolved within the same partition), + * then we can check the architecture of their target. + */ + if (guestfs_is_file_opts (g, binaries[i], + GUESTFS_IS_FILE_OPTS_FOLLOWSYMLINKS, 1, -1) > 0) { + CLEANUP_FREE char *resolved = NULL; + + /* Ignore errors from realpath and file_architecture calls. */ guestfs_push_error_handler (g, NULL, NULL); - arch = guestfs_file_arch...
2016 Mar 31
1
Re: [PATCH] inspect: use os-release for CoreOS
...= OS_DISTRO_DEBIAN; >> else if (VALUE_IS ("fedora")) >> @@ -1055,6 +1057,16 @@ guestfs_int_check_coreos_usr (guestfs_h *g, struct inspect_fs *fs) >> >> fs->type = OS_TYPE_LINUX; >> fs->distro = OS_DISTRO_COREOS; >> + >> + if (guestfs_is_file_opts (g, "/lib/os-release", >> + GUESTFS_IS_FILE_OPTS_FOLLOWSYMLINKS, 1, -1) > 0) { >> + r = parse_os_release (g, fs, "/lib/os-release"); >> + if (r == -1) /* error */ >> + return -1; >> + if (r == 1)...
2015 Sep 09
2
[PATCH] inspect: try to use /etc/os-release on Linux guests
...Ubuntu has /etc/lsb-release containing: * DISTRIB_ID=Ubuntu # Distro * DISTRIB_RELEASE=10.04 # Version @@ -348,6 +482,15 @@ guestfs_int_check_linux_root (guestfs_h *g, struct inspect_fs *fs) fs->type = OS_TYPE_LINUX; + if (guestfs_is_file_opts (g, "/etc/os-release", + GUESTFS_IS_FILE_OPTS_FOLLOWSYMLINKS, 1, -1) > 0) { + r = parse_os_release (g, fs, "/etc/os-release"); + if (r == -1) /* error */ + return -1; + if (r == 1) /* ok - detected the release from this...
2015 Aug 25
2
[PATCH 1/2] inspect: recognize the ALT Linux distribution
...", 0) static void check_architecture (guestfs_h *g, struct inspect_fs *fs); static int check_hostname_unix (guestfs_h *g, struct inspect_fs *fs); @@ -414,6 +415,26 @@ guestfs_int_check_linux_root (guestfs_h *g, struct inspect_fs *fs) fs->minor_version = 0; } } + else if (guestfs_is_file_opts (g, "/etc/altlinux-release", + GUESTFS_IS_FILE_OPTS_FOLLOWSYMLINKS, 1, -1) > 0) { + fs->distro = OS_DISTRO_ALTLINUX; + + if (parse_release_file (g, fs, "/etc/altlinux-release") == -1) + return -1; + + if (match2 (g, fs->prod...
2016 May 17
3
[PATCH 0/2] src: introduce an helper version struct
Hi, this adds an helper version struct, and uses it in the backends (for the libvirt and qemu versions) and inspection code. This also moves common code to that, so it is not repeated in many places. This should help with the small refactoring proposed with https://www.redhat.com/archives/libguestfs/2016-May/msg00070.html Thanks, Pino Toscano (2): src: start unifying version handling
2016 May 18
3
[PATCH v2 0/2] src: introduce an helper version struct
Hi, this adds an helper version struct, and uses it in the backends (for the libvirt and qemu versions) and inspection code. This also moves common code to that, so it is not repeated in many places. This should help with the small refactoring proposed with https://www.redhat.com/archives/libguestfs/2016-May/msg00070.html Thanks, Pino Toscano (2): src: start unifying version handling
2015 Sep 08
1
[PATCH] inspect: recognize the Frugalware distribution
...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_file_opts (g, "/etc/frugalware-release", + GUESTFS_IS_FILE_OPTS_FOLLOWSYMLINKS, 1, -1) > 0) { + fs->distro = OS_DISTRO_FRUGALWARE; + + if (parse_release_file (g, fs, "/etc/frugalware-release") == -1) + return -1; + + if (match2 (g, fs-&g...
2015 Jun 02
1
[PATCH 2/3] inspection: Add support for CoreOS
...S; + r = 1; + } else if (STRPREFIX (lines[i], "DISTRIB_RELEASE=")) { char *major, *minor; if (match2 (g, &lines[i][16], re_major_minor, &major, &minor)) { @@ -338,7 +348,7 @@ guestfs_int_check_linux_root (guestfs_h *g, struct inspect_fs *fs) if (guestfs_is_file_opts (g, "/etc/lsb-release", GUESTFS_IS_FILE_OPTS_FOLLOWSYMLINKS, 1, -1) > 0) { - r = parse_lsb_release (g, fs); + r = parse_lsb_release (g, fs, "/etc/lsb-release"); if (r == -1) /* error */ return -1; if (r == 1)...
2015 May 29
2
[PATCH 2/3] inspection: Add support for CoreOS
...S; + r = 1; + } else if (STRPREFIX (lines[i], "DISTRIB_RELEASE=")) { char *major, *minor; if (match2 (g, &lines[i][16], re_major_minor, &major, &minor)) { @@ -338,7 +348,7 @@ guestfs_int_check_linux_root (guestfs_h *g, struct inspect_fs *fs) if (guestfs_is_file_opts (g, "/etc/lsb-release", GUESTFS_IS_FILE_OPTS_FOLLOWSYMLINKS, 1, -1) > 0) { - r = parse_lsb_release (g, fs); + r = parse_lsb_release (g, fs, "/etc/lsb-release"); if (r == -1) /* error */ return -1; if (r == 1)...
2016 Jan 26
2
[PATCH] inspect: Get architecture of Alpine Linux from /bin/busybox.
All the files in /bin are links to busybox. guestfs_file_architecture doesn't follow symlinks so it fails. Therefore check /bin/busybox (not a 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 +++
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.
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
2014 Sep 22
1
[PATCH] inspect: basic Minix support
...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 = OS_TYPE_MINIX; + + if (guestfs_is_file_opts (g, "/etc/version", + GUESTFS_IS_FILE_OPTS_FOLLOWSYMLINKS, 1, -1) > 0) { + char *major, *minor; + if (parse_release_file (g, fs, "/etc/version") == -1) + return -1; + + if (match2 (g, fs->product_name, re_minix, &major, &min...