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
>
>
>
|