fstab,mount: detect rbind as bind mount

Correctly detect rbind mount option as bind mount.

Fixes https://bugzilla.novell.com/show_bug.cgi?id=804575.
This commit is contained in:
Frederic Crozat 2013-02-21 16:09:40 +01:00 committed by Lennart Poettering
parent ffa7cd15cd
commit 3f8ee79182
2 changed files with 9 additions and 1 deletions

View file

@ -329,6 +329,12 @@ static bool mount_is_bind(MountParameters *p) {
if (p->fstype && streq(p->fstype, "bind"))
return true;
if (mount_test_option(p->options, "rbind"))
return true;
if (p->fstype && streq(p->fstype, "rbind"))
return true;
return false;
}

View file

@ -178,7 +178,9 @@ static bool mount_is_bind(struct mntent *me) {
return
hasmntopt(me, "bind") ||
streq(me->mnt_type, "bind");
streq(me->mnt_type, "bind") ||
hasmntopt(me, "rbind") ||
streq(me->mnt_type, "rbind");
}
static bool mount_is_network(struct mntent *me) {