From: Richard W.M. Jones Date: Fri, 29 Oct 2010 08:46:59 +0000 (+0100) Subject: inspect: Ignore Pardus "/.swap" swapfile. X-Git-Tag: 1.5.26~8 X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=commitdiff_plain;h=12cf22ade46ba07aa162a311d3369096292d6d02;hp=a0f85ba643990da25b6afe6a2bbd2407cf312c73 inspect: Ignore Pardus "/.swap" swapfile. --- diff --git a/src/inspect.c b/src/inspect.c index 5bd332f..3421baa 100644 --- a/src/inspect.c +++ b/src/inspect.c @@ -843,11 +843,12 @@ add_fstab_entry (guestfs_h *g, struct inspect_fs *fs, device = guestfs_findfs_uuid (g, &spec[5]); else if (STRPREFIX (spec, "LABEL=")) device = guestfs_findfs_label (g, &spec[6]); - /* Resolve guest block device names. */ - else if (spec[0] == '/') + /* Ignore "/.swap" (Pardus) and pseudo-devices like "tmpfs". */ + else if (STRPREFIX (spec, "/dev/")) + /* Resolve guest block device names. */ device = resolve_fstab_device (g, spec); - /* Also ignore pseudo-devices completely, like spec == "tmpfs". - * If we haven't resolved the device successfully by this point, + + /* If we haven't resolved the device successfully by this point, * we don't care, just ignore it. */ if (device == NULL)