search for: guestfs_is_file_opts_followsymlinks

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

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
...eck - * 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, "/etc/centos-release", + GUESTFS_IS_FILE_OPTS_FOLLOWSYMLINKS, 1, -1)...
2016 Mar 30
2
[PATCH] inspect: use os-release for CoreOS
...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 file */ + goto skip_release_checks; + } + if (guestfs_is_file_opts (g, "/share/coreo...
2016 Mar 30
0
Re: [PATCH] inspect: use os-release for CoreOS
...ora")) > @@ -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 file */ > + goto skip_release_checks; > + } > + > if (gue...
2013 Dec 20
1
[PATCH] inspect: fix detection of newer CirrOS versions (RHBZ#1045450).
...+ 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 (g, fs) == -1) + return -1; + } /* Buildroot (http://buildroot.net) is an embedded Linux distro...
2016 Jan 26
1
[PATCH] inspect: resolve symlinks when detecting 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_architecture (g, binaries[i]); + resolved = guestfs_realpath (g, binaries[i]); +...
2016 Mar 31
1
Re: [PATCH] inspect: use os-release for CoreOS
...5,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 file */ >> + goto skip_release_checks; >> +...
2015 Sep 09
2
[PATCH] inspect: try to use /etc/os-release on Linux guests
...# 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 file */ + goto skip_release_checks; + } + if (guestfs_is_file_opts (g, "/etc/lsb-rel...
2015 Aug 25
2
[PATCH 1/2] inspect: recognize the ALT Linux distribution
...t 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->product_name, re_altlinux, &major, &minor)) { + fs->major_version = guestfs_int_parse_unsigned_in...
2015 Sep 08
1
[PATCH] inspect: recognize the Frugalware distribution
...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->product_name, re_frugalware, &major, &minor)) { + fs->major_version = guestfs_int_parse_unsig...
2016 May 18
0
[PATCH 2/2] inspect: switch to version struct for os major/minor version
...return -1; - } + if (guestfs_int_version_from_x_y_re (g, &fs->version, fs->product_name, + re_altlinux) == -1) + return -1; } else if (guestfs_is_file_opts (g, "/etc/redhat-release", GUESTFS_IS_FILE_OPTS_FOLLOWSYMLINKS, 1, -1) > 0) { @@ -584,76 +543,76 @@ guestfs_int_check_linux_root (guestfs_h *g, struct inspect_fs *fs) if ((major = match1 (g, fs->product_name, re_fedora)) != NULL) { fs->distro = OS_DISTRO_FEDORA; - fs->major_version = guestfs_int_parse_unsigned_int (g, major); +...
2015 Jun 02
1
[PATCH 2/3] inspection: Add support for CoreOS
...ot;)) { 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) /* ok - detected the release from this file */ @@ -795,6 +805,59 @@ guestfs_int_check_minix_root (g...
2015 May 29
2
[PATCH 2/3] inspection: Add support for CoreOS
...ot;)) { 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) /* ok - detected the release from this file */ @@ -795,6 +805,59 @@ guestfs_int_check_minix_root (g...
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 +++
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
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
...truct 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, &minor)) { + fs->major_version = guestfs___parse_unsigned_int (g, major); + free (majo...
2016 Dec 06
0
[PATCH 5/5] inspect: gather info from /usr filesystems as well (RHBZ#1401474)
...* The currently mounted device looks like a Linux /usr. */ +int +guestfs_int_check_linux_usr (guestfs_h *g, struct inspect_fs *fs) +{ + int r; + + fs->type = OS_TYPE_LINUX; + fs->role = OS_ROLE_USR; + + 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 file */ + goto skip_release_checks; + } + + skip_release_checks:; + + /* Determine the arch...