summaryrefslogtreecommitdiff
path: root/lib/mountlist.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2000-05-29 16:23:45 +0000
committerJim Meyering <jim@meyering.net>2000-05-29 16:23:45 +0000
commit11c6d21d5271cda262c55ad0c890257da746c8a0 (patch)
tree2c49366131d8d071845d86c2772a204c91e1dc92 /lib/mountlist.c
parentab2c79328ee3c85a742c6c5e76bedf19adbd7a65 (diff)
downloadcoreutils-11c6d21d5271cda262c55ad0c890257da746c8a0.tar.xz
(read_filesystem_list) [MOUNTED_VMOUNT]: Ignore mounts
with the `ignore' attribute. Based on a patch from Mark D. Roth.
Diffstat (limited to 'lib/mountlist.c')
-rw-r--r--lib/mountlist.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/mountlist.c b/lib/mountlist.c
index 852be464a..d301e674c 100644
--- a/lib/mountlist.c
+++ b/lib/mountlist.c
@@ -1,5 +1,5 @@
/* mountlist.c -- return a list of mounted filesystems
- Copyright (C) 1991, 1992, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1991, 1992, 1997-2000 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -725,7 +725,17 @@ read_filesystem_list (int need_fs_type)
for (thisent = entries; thisent < entries + bufsize;
thisent += vmp->vmt_length)
{
+ char *options, *ignore;
vmp = (struct vmount *) thisent;
+
+ options = thisent + vmp->vmt_data[VMT_ARGS].vmt_off;
+ ignore = strstr (options, "ignore");
+ if (ignore
+ && (ignore == options || ignore[-1] == ',')
+ && (ignore[sizeof "ignore" - 1] == ','
+ || ignore[sizeof "ignore" - 1] == '\0'))
+ continue;
+
me = (struct mount_entry *) xmalloc (sizeof (struct mount_entry));
if (vmp->vmt_flags & MNT_REMOTE)
{