[systemd-devel] [PATCH] fstab-generator: ignore devices with fstype "ignore"

Dave Reisner dreisner at archlinux.org
Sun Jun 17 20:07:40 PDT 2012


This is a valid field as documented by fstab(5). In line with mount(8)'s
behavior when iterating through /etc/fstab, the generator should skip
this entry entirely.
---
This actually isn't the current behavior of the new mount in util-linux, but of
the old mount implementation. I've sent a patch for libmount to behave the in
the same way since it appears to be a regression.

http://thread.gmane.org/gmane.linux.utilities.util-linux-ng/6030

 src/fstab-generator/fstab-generator.c |    6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/fstab-generator/fstab-generator.c b/src/fstab-generator/fstab-generator.c
index d9ba3e3..7920acd 100644
--- a/src/fstab-generator/fstab-generator.c
+++ b/src/fstab-generator/fstab-generator.c
@@ -455,6 +455,12 @@ static int parse_fstab(void) {
                 char *where, *what;
                 int k;
 
+                if (streq(me->mnt_type, "ignore")) {
+                        log_debug("Skipping entry what=%s where=%s type=ignore",
+                                        me->mnt_fsname, me->mnt_dir);
+                        continue;
+                }
+
                 what = fstab_node_to_udev_node(me->mnt_fsname);
                 if (!what) {
                         log_error("Out of memory");
-- 
1.7.10.4



More information about the systemd-devel mailing list