diff options
-rw-r--r-- | lib/ext2fs/ismounted.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/ext2fs/ismounted.c b/lib/ext2fs/ismounted.c index 46d330d9..c9e6a9d0 100644 --- a/lib/ext2fs/ismounted.c +++ b/lib/ext2fs/ismounted.c @@ -128,14 +128,14 @@ static errcode_t check_mntent_file(const char *mtab_file, const char *file, while ((mnt = getmntent (f)) != NULL) { if (mnt->mnt_fsname[0] != '/') continue; - if (stat(mnt->mnt_dir, &st_buf) != 0) - continue; if (strcmp(file, mnt->mnt_fsname) == 0) { + if (stat(mnt->mnt_dir, &st_buf) != 0) + continue; if (file_rdev && (file_rdev != st_buf.st_dev)) { #ifdef DEBUG printf("Bogus entry in %s! " - "(%s does not exist)\n", - mtab_file, mnt->mnt_dir); + "(%s is not mounted on %s)\n", + mtab_file, file, mnt->mnt_dir); #endif /* DEBUG */ continue; } |