summaryrefslogtreecommitdiffstats
path: root/src/inspect_fs_unix.c
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2012-03-07 14:11:53 +0000
committerRichard W.M. Jones <rjones@redhat.com>2012-03-07 18:36:46 +0000
commitb9061ddf2d337fcc42cfeae0ac8ec4e329a1a421 (patch)
tree61823717fc45cc45ddef70ea78bed5552f6c8047 /src/inspect_fs_unix.c
parentb106dda97c9e18563bb27a44a025016fef6dec97 (diff)
downloadlibguestfs-b9061ddf2d337fcc42cfeae0ac8ec4e329a1a421.tar.gz
libguestfs-b9061ddf2d337fcc42cfeae0ac8ec4e329a1a421.tar.xz
libguestfs-b9061ddf2d337fcc42cfeae0ac8ec4e329a1a421.zip
Add support for Buildroot and Cirros distributions.
Diffstat (limited to 'src/inspect_fs_unix.c')
-rw-r--r--src/inspect_fs_unix.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/inspect_fs_unix.c b/src/inspect_fs_unix.c
index f34075d5..252cce3c 100644
--- a/src/inspect_fs_unix.c
+++ b/src/inspect_fs_unix.c
@@ -464,7 +464,22 @@ guestfs___check_linux_root (guestfs_h *g, struct inspect_fs *fs)
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.
+ */
+ else if (guestfs_exists (g, "/etc/br-version") > 0) {
+ if (guestfs_exists (g, "/usr/share/cirros/logo") > 0)
+ fs->distro = OS_DISTRO_CIRROS;
+ else
+ fs->distro = OS_DISTRO_BUILDROOT;
+
+ /* /etc/br-version has the format YYYY.MM[-git/hg/svn release] */
+ if (parse_release_file (g, fs, "/etc/br-version") == -1)
+ return -1;
+ if (guestfs___parse_major_minor (g, fs) == -1)
+ return -1;
+ }
skip_release_checks:;