Re: help writing file system

From: Alan Cox (alan@lxorguk.ukuu.org.uk)
Date: Tue Apr 08 2003 - 06:35:53 EST


On Mer, 2003-04-09 at 06:16, dave wrote:
> My report files work like this
> 1. OPEN
> Memory is allocated and status information is loaded into the memory
> 2. READ
> Normal read of the memory (report)
> 5. RELASE
> The report memory is freed
>
> so now I want my driver when is starts to make an mount point in /proc/lnvrm
> and then

/proc doesnt work that way. /proc works on the basis that each read
generates a new fake set of data, reports it and frees it.

> 1. how do you make a mount point in /proc ?

Just make a directory, you can mount over /proc/foo if you wish

> 2. how do you auto mount that point ?

You dont. You let the user do it

> 3 how do you make a device node in proc ? (I wont use this but it is
> interesting to me)

You dont

All this is actually a lot easier in 2.5 with libfs/sysfs for managing
system objects.

Alan

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



This archive was generated by hypermail 2b29 : Tue Apr 15 2003 - 22:00:15 EST