From 45885d136c6df8a343dea36cddfaf17a233c3dbc Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Thu, 13 Oct 2005 14:32:22 +0000 Subject: [PATCH] In parse_mount_entries return the loop device instead of the mounted file for loop mounts. --- dlls/ntdll/directory.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/dlls/ntdll/directory.c b/dlls/ntdll/directory.c index 4e4809b069d..60376d4f0c4 100644 --- a/dlls/ntdll/directory.c +++ b/dlls/ntdll/directory.c @@ -268,6 +268,16 @@ static char *parse_mount_entries( FILE *f, dev_t dev, ino_t ino ) return device + 4; } } + else if (!stat( entry->mnt_fsname, &st ) && S_ISREG(st.st_mode)) + { + /* if device is a regular file check for a loop mount */ + if ((device = strstr( entry->mnt_opts, "loop=" ))) + { + char *p = strchr( device + 5, ',' ); + if (p) *p = 0; + return device + 5; + } + } else return entry->mnt_fsname; }