forked from pool/systemd
3283fdeb6b
add: 1026-re-add-persistent-net.patch - rebase all patches, ensure that they apply properly. OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=357
45 lines
1.5 KiB
Diff
45 lines
1.5 KiB
Diff
From df77b11852d6b3495848c4123e7cbd9f099910f9 Mon Sep 17 00:00:00 2001
|
|
From: Frederic Crozat <fcrozat@suse.com>
|
|
Date: Thu, 21 Feb 2013 15:40:52 +0100
|
|
Subject: [PATCH] detect rbind as bind mount
|
|
|
|
Correctly detect rbind mount option as bind mount.
|
|
Fixes https://bugzilla.novell.com/show_bug.cgi?id=804575.
|
|
---
|
|
src/core/mount.c | 6 ++++++
|
|
src/fstab-generator/fstab-generator.c | 4 +++-
|
|
2 files changed, 9 insertions(+), 1 deletion(-)
|
|
|
|
Index: systemd-195/src/core/mount.c
|
|
===================================================================
|
|
--- systemd-195.orig/src/core/mount.c
|
|
+++ systemd-195/src/core/mount.c
|
|
@@ -320,6 +320,12 @@ static bool mount_is_bind(MountParameter
|
|
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;
|
|
}
|
|
|
|
Index: systemd-195/src/fstab-generator/fstab-generator.c
|
|
===================================================================
|
|
--- systemd-195.orig/src/fstab-generator/fstab-generator.c
|
|
+++ systemd-195/src/fstab-generator/fstab-generator.c
|
|
@@ -199,7 +199,9 @@ static bool mount_is_bind(struct mntent
|
|
|
|
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) {
|