[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: Bug#14146: KIO::findDeviceMountPoint broken on FreeBSD
From:       David Faure <david () mandrakesoft ! com>
Date:       2000-11-01 6:19:32
[Download RAW message or body]

On Tue, Oct 31, 2000 at 09:42:51PM -0800, Nick Sayer wrote:
[...]
> > > FreeBSD doesn't have a mounttab or similar file. You should call getfsstat with \
> > > a large buffer. It returns the buffer filled with a structure for each mounted \
> > > fs. If you call it with NULL as the pointer, it returns the number of mounted \
> > > filesystems. So you would call it with NULL first, then malloc an array large \
> > > enough and call it again to fill it up.
> > 
> There is indeed a setfsent() and friends, but it reads the fstab. There
> is indeed an entry in the fstab file for /cdrom, as there must be for
> this to work, but it has 'noauto' and I'm sure that the filesystem is
> unmounted at the time the icon shows it mounted. There is no mtab or
> similar file anywhere. There is a getmntinfo() call if you don't like
> the semantics of getfsstat (it uses getfsstat internally).

Hmm, I see. Stephan definitely mixed up mnttab and fstab I'm afraid :-}
Using setmntent and falling back to fopen looks ok, but having a case
in between that uses setfsent looks wrong, if setfsent indeed opens fstab.
(Note that is takes no arguments.....)

getmntinfo looks like yet another kind of api. I wonder if it would
fit in the above set of defines. I guess so, but it would be easier
if you could have a go at it than if we, non-freebsd users, try :-}

-- 
David FAURE
david@mandrakesoft.com, faure@kde.org
http://home.clara.net/faure/, http://www.konqueror.org/
KDE, Making The Future of Computing Available Today


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic