[Dirvish] xdev and other boolean options

Keith Lofstrom keithl at kl-ic.com
Thu Feb 3 11:30:24 PST 2005


On Thu, Feb 03, 2005 at 08:56:36AM -0500, Zachary Fortna wrote:
> Spoke too soon.  Xdev: false doesn't work, but xdev: 0 allows it to cross
> into the other filesystems.  Any idea why that would be the case?

Because I was wrong. 

The only way to currently specify a boolean FALSE is with "0", or for
some options leaving them unspecified and "Perl defaulted" to FALSE. 

Anything with a specified option value other than '0' -- true, one,
6, false, off, fred, etc., results in a boolean TRUE.

The boolean options 'checksum', 'sparse', 'no-run', 'whole-file',
'xdev', 'init' and 'zxfer' default to 0 ( only 'checksum' is
explicitly documented in dirvish.conf(5) to default to 0).  Options
'numeric-ids', 'permissions', and 'stats' default to 1 and
defaults are explicitly documented, while the option 'devices'
defaults to 0 but the default is not explicitly documented.
So at very least we need to improve the documentation by adding
"Default value: X" lines.


One question for the team is, *should* false work?  We could make
"false" and "off" and "no" work if we put something like this after
the GetOptions in dirvish:

for ( @BOOLEAN_FIELDS ) { $$Options{ $_ } =~ s/(false|off|no)/0/i }

dirvish-locate and dirvish-expire may need this treatment, too, but
I can't find any obvious places where their behavior is changed by
the boolean options, except for 'no-run', which is read in as a flag.

Yes, dirvish users can RTFM.  But the more ways that things can
work, the less often our users will ask questions, and the sooner
they will achieve success.

Should we do this?  

Keith

P.S.  still working on Subversion.  Lots of broken software out there...

-- 
Keith Lofstrom          keithl at keithl.com         Voice (503)-520-1993
KLIC --- Keith Lofstrom Integrated Circuits --- "Your Ideas in Silicon"
Design Contracting in Bipolar and CMOS - Analog, Digital, and Scan ICs


More information about the Dirvish mailing list