devfs
[Top] [All Lists]

Re: Userspace application check for devfs in use?

To: "Richard Gooch" <rgooch@xxxxxxxxxxxxxxx>
Subject: Re: Userspace application check for devfs in use?
From: "Kevin P. Fleming" <kevin@xxxxxxxxxxxxx>
Date: Tue, 17 Jul 2001 09:28:25 -0700
Cc: <devfs@xxxxxxxxxxx>
Organization: LSG, Inc.
References: <000901c10e76$c8ee6140$6baaa8c0@kevin> <200107170641.f6H6fhr04305@xxxxxxxxxxxxxxxxxxxxxxx>
Sender: owner-devfs@xxxxxxxxxxx
I originally _was_ going to check S_IFCHR on /dev/.devfsd, but forgot to
finish typing the code and realized that just getting a non-error back from
stat() would be sufficient. It works just fine, thanks for the info.

----- Original Message -----
From: "Richard Gooch" <rgooch@xxxxxxxxxxxxxxx>
To: "Kevin P. Fleming" <kevin@xxxxxxxxxxxxx>
Cc: <devfs@xxxxxxxxxxx>
Sent: Monday, July 16, 2001 11:41 PM
Subject: Re: Userspace application check for devfs in use?


> Kevin P. Fleming writes:
> > What is the proper (documented, recommended, whatever) method for a
> > userspace application to check if the /dev filesystem is coming from
devfs
> > or not? I am modifying a tunneling application to use new-style /dev
paths
> > if devfs is in use, but it needs to know...
> >
> > Right now I'm just relying on a stat() of /dev/.devfsd returning
> > without an error if devfs is mounted on /dev, but that may not be
> > optimal (or future-proof). Any other suggestions?
>
> That *is* the correct method. But don't test for filetype. Just
> existence.
>
> Regards,
>
> Richard....
> Permanent: rgooch@xxxxxxxxxxxxx
> Current:   rgooch@xxxxxxxxxxxxxxx
>
>
>


<Prev in Thread] Current Thread [Next in Thread>