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

List:       kfm-devel
Subject:    Re: KDirLister keeps mounted devices in use
From:       Lubos Lunak <l.lunak () suse ! cz>
Date:       2003-01-16 10:06:01
[Download RAW message or body]

On Wednesday 15 of January 2003 20:43, Michael Brade wrote:
> On Wednesday 15 January 2003 18:18, Lubos Lunak wrote:
> > > > - 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?
>
> Yes, ATM I do exactly the opposite :-) But a friend told me where to find
> the BSD manpages, so I'll fix the BSD stuff in a sec.
>
> > > Here's the patch to implement the above.
> >
> >  Can strstr(ff->fs mntops, "noauto")  possibly get some false hits?
>
> Sure. Why do you think not?

 I think you wanted to say "no, it can't". Maybe I'm too pedantic, but what if 
there's a fs with possible option "screw_it_up=noauto" ;) ? I'd do
const char* pos = strstr( options, "noauto" );
if( pos != NULL && ( pos == options || pos[ -1 ] == ',' )
	// ok


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

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

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