Re: [gamin] global config file



On Wed, 2005-08-03 at 13:31 -0400, Daniel Veillard wrote:
> On Wed, Aug 03, 2005 at 10:11:51AM -0400, John McCutchan wrote:
> > Yo,
> > 
> > I'd like to add support for a global config file. Does /etc/gaminrc make
> > sense? I'd also like the 'fsset' command. It would look like this:
> 
>   It makes sense except I'm wondering about multiple files in a directory
> but yeah at the current state it sounds fine.
> 

I don't understand what you are getting at.

> > fsset <filesystem type as appears in mtab/fstab>
> > <"KERNEL"|"POLL"|"NONE"> <unsigned int poll timer>
> > 
> > This would set the two preferences on the filesystem type. You can set
> > that you want KERNEL or POLL or NONE watching. You also set the minimum
> > time between polls.
> 
>   Your description is ambiguous. Can your timer be missing ? If yes what's
>   the semantic ? If no howdo you make an entry not changing the default.
>   What happends when multiple conflicting declarations are present ?
> 

It's not ambiguous at all. Everything is required. Maybe the line wrap
caused confusion.

fsset <fsname> <method> <poll_timeout>

fsname is "ext3", "nfs", etc..
method is "KERNEL" or "POLL" or "NONE"
poll timeout is a number >= 0. 

If there are conflicting declarations, the last one to be processed is
the one followed. In gam_conf I parse the user gaminrc first, than the
system one, so that system administrators can over ride user
preferences.

> > I'd like to factor the config file reading out of exclude.c into
> > gam_config 
> 
>   You mean a new module ? We would lost history... there is pros and cons.

Sorry, I've already gone and done it. I just cut the config file reading
code from gam_excludes.c into gam_conf.c. Now that we've added a new
config option that doesn't have anything to do with the exclude list it
makes sense to seperate the config parsing from the subsystems that use
the config file. As for loss of history, it was 20 lines of obvious code
I feel like not much was lost. 

-- 
John McCutchan <ttb tentacle dhs org>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]