KDirLister keeps mounted devices in use

Lubos Lunak l.lunak at suse.cz
Wed Jan 15 17:18:25 GMT 2003


On Wednesday 15 of January 2003 13:30, Michael Brade wrote:
> On Wednesday 15 January 2003 11:24, Lubos Lunak wrote:
> >  Where's the patch :) ?
>
> Oh, on kde-cvs :)
>
> > But I think it will require both mtab and fstab (do
> > all systems have both of them?).
>
> No idea, but I think so.
>
> > IMHO it could work this way:
> > - the dir is not in mtab -> ok, not mounted
>
> This case should be basically impossible, no? Everything (except the new
> devfs) is mounted.

 Oops, of course. I kind forgot / is mounted too :).

>
> > - the dir is in mtab but not fstab -> not ok, manually mounted
> > - the dir is in mtab and fstab and it has noauto option -> not ok
> > - otherwise (mtab&fstab and doesn't have noauto) -> ok
>
> Indeed, that should catch all cases then. Still, I can't finish the
> implementation as I don't know about AIX and BSD implementations of
> get[fs,mnt]ent.

 Can't those implementations simply treat all cases as manually mounted, until 
somebody implements that?

>
> Here's the patch to implement the above.

 Can strstr(ff->fs mntops, "noauto")  possibly get some false hits?

> I think it should be backported if
> someone does the AIX and BSD implementation. Also, this stuff still has to
> be #defined.
>
> Untested, I have to go to university now.

-- 
Lubos Lunak
KDE developer
---------------------------------------------------------------------
SuSE CR, s.r.o.  e-mail: l.lunak at suse.cz , l.lunak at kde.org
Drahobejlova 27  tel: +420 2 9654 2373
190 00 Praha 9   fax: +420 2 9654 2374
Czech Republic   http://www.suse.cz/





More information about the kfm-devel mailing list