From 3004e2c7716904979d88d85d3636086aa6f40271 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Mon, 29 May 2000 16:23:45 +0000 Subject: [PATCH] (read_filesystem_list) [MOUNTED_VMOUNT]: Ignore mounts with the `ignore' attribute. Based on a patch from Mark D. Roth. --- lib/mountlist.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/lib/mountlist.c b/lib/mountlist.c index 852be464ad..d301e674c2 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) { -- 2.30.2