Re: [patch] Remove the "none" entries from /proc/mounts

H. Peter Anvin (hpa@zytor.com)
29 Jun 2000 17:29:25 -0700


Followup to: <20000628232816.A498@codepoet.org>
By author: Erik Andersen <andersen@codepoet.org>
In newsgroup: linux.dev.kernel
>
> --- linux/fs/super.c.virgin Wed Jun 28 22:42:35 2000
> +++ linux/fs/super.c Wed Jun 28 22:44:49 2000
> @@ -443,6 +443,9 @@
> path = d_path(tmp->mnt_root, tmp, buffer, PAGE_SIZE);
> if (!path)
> continue;
> + /* Filter out virtual filesystems that are for internal use only */
> + if (!strcmp("none", tmp->mnt_devname))
> + continue;
> len += sprintf( buf + len, "%s %s %s %s",
> tmp->mnt_devname, path,
> tmp->mnt_sb->s_type->name,
>
>

Now, what if you do what *most* people do for proc, devpts, and shmfs (and is
the recommended option), and use "none" for the device there?

Lines like:

none /dev/pts devpts rw 0 0
none /proc proc rw 0 0

... are absolutely correct.

You have to filter out the "magicness" of these entries, not the
string "none".

<HARP>
We also need a standardized quoting system for these strings; or
alternately terminate them with \0. Otherwise, this file can get
corrupted far too easily.
</HARP>

-hpa

-- 
<hpa@transmeta.com> at work, <hpa@zytor.com> in private!
"Unix gives you enough rope to shoot yourself in the foot."
http://www.zytor.com/~hpa/puzzle.txt

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/