diff options
author | Richard W.M. Jones <[email protected]> | 2011-09-16 15:26:20 +0100 |
---|---|---|
committer | Richard W.M. Jones <[email protected]> | 2011-09-16 15:40:11 +0100 |
commit | 23105010a9b1b15ab234e7e43aa43f5764a40946 (patch) | |
tree | 6443e76c00e96a66618e5b07c84f00e23a8efba2 | |
parent | 1a39b686edabb9bd2b79945b3571daddd31e098b (diff) | |
download | libguestfs-23105010a9b1b15ab234e7e43aa43f5764a40946.tar.gz libguestfs-23105010a9b1b15ab234e7e43aa43f5764a40946.tar.xz libguestfs-23105010a9b1b15ab234e7e43aa43f5764a40946.zip |
inspection: Handle /dev/root in /etc/fstab.
This means "the device that holds /etc/fstab", so map it correctly.
This fixes support for ttylinux and also some other guests that use
/dev/root instead of a real device name.
(cherry picked from commit 917f947590c92318fee2545ba88245d0de012e31)
-rw-r--r-- | src/inspect_fs_unix.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/inspect_fs_unix.c b/src/inspect_fs_unix.c index b8be049b..e2fad51b 100644 --- a/src/inspect_fs_unix.c +++ b/src/inspect_fs_unix.c @@ -694,6 +694,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); |