X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=src%2Finspect_fs_unix.c;h=00d3cd7d7a9e62763b68a2f22d330ecb57e297ff;hb=4abb239dcc7b1d235783bb0b5e417c4b88b00fea;hp=b8be049b54c0a7e53d1eab9199c97ee4d32d0988;hpb=bad3f4b54a959685f3c0697238fc5753096834fb;p=libguestfs.git diff --git a/src/inspect_fs_unix.c b/src/inspect_fs_unix.c index b8be049..00d3cd7 100644 --- a/src/inspect_fs_unix.c +++ b/src/inspect_fs_unix.c @@ -404,6 +404,16 @@ guestfs___check_linux_root (guestfs_h *g, struct inspect_fs *fs) if (guestfs___parse_major_minor (g, fs) == -1) return -1; } + else if (guestfs_exists (g, "/etc/ttylinux-target") > 0) { + fs->distro = OS_DISTRO_TTYLINUX; + + fs->product_name = guestfs___first_line_of_file (g, "/etc/ttylinux-target"); + if (fs->product_name == NULL) + return -1; + + if (guestfs___parse_major_minor (g, fs) == -1) + return -1; + } skip_release_checks:; @@ -694,6 +704,9 @@ add_fstab_entry (guestfs_h *g, struct inspect_fs *fs, else if (STRPREFIX (spec, "LABEL=")) device = guestfs_findfs_label (g, &spec[6]); /* Ignore "/.swap" (Pardus) and pseudo-devices like "tmpfs". */ + else if (STREQ (spec, "/dev/root")) + /* Resolve /dev/root to the current device. */ + device = safe_strdup (g, fs->device); else if (STRPREFIX (spec, "/dev/")) /* Resolve guest block device names. */ device = resolve_fstab_device (g, spec);