[Pkg-libvirt-commits] [libguestfs] 05/87: inspect: fix detection of newer CirrOS versions (RHBZ#1045450).

Hilko Bengen bengen at moszumanska.debian.org
Wed Feb 19 21:09:52 UTC 2014


This is an automated email from the git hooks/post-receive script.

bengen pushed a commit to branch debian
in repository libguestfs.

commit 5cb1b00d27eaf5701a7a1022807789c48ec85673
Author: Pino Toscano <ptoscano at redhat.com>
Date:   Fri Dec 20 15:00:09 2013 +0100

    inspect: fix detection of newer CirrOS versions (RHBZ#1045450).
    
    Add an own case for CirrOS, based on the /etc/cirros/version file
    provided in newer version instead of the Buildroot-generated
    /etc/br-version.
    
    (cherry picked from commit d20289186d257105f304a4fa0c3e6d26a5fb0807)
---
 src/inspect-fs-unix.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/src/inspect-fs-unix.c b/src/inspect-fs-unix.c
index 8e0f135..93e035f 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 (g, fs) == -1)
+      return -1;
+  }
   /* Buildroot (http://buildroot.net) is an embedded Linux distro
    * toolkit.  It is used by specific distros such as Cirros.
    */

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libguestfs.git



More information about the Pkg-libvirt-commits mailing list