Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

Re: [RFC] Allow block device providers to veto file systems

From: Frans Pop <elendil(at)planet.nl>
Date: Fri Nov 30 2007 - 12:39:50 EST


On Friday 30 November 2007, Max Vozeler wrote:
> > Why pipe them and not just pass them as a parameter?
> > Call the script as '$i $dev $id "$filesystems"' and in the script have
> > 'filesystems="$3"'.
>
> That's what I tried first.
>
> I changed to piping because otherwise we'd have to do
> comparably complex list comparisons. E.g. either:

Hmm. I don't get this. You could still echo back the valid options, same as you do now. You just pass them _in_ as a parameter which avoids the (IMO) ugly 'cat' commands in the veto script.
AFAICT my suggestion does not fundamentally change your solution.

> > The preferred indentation for case statements is:
> > case fs in
> > ext2)
> > echo $fs
> > ;;
> > esac
>
> I personally prefer the style I originally used because
> it saves one level of (to me) not meaningful indentation,
> but that's a matter of taste. I'm happy to change it :-)

No, it does not cost a level of indentation because the conditions are indented by only 4 spaces so their code is still only indented by a single tab. Indenting the conditions by spaces has the advantage that the total case-esac block is better recognizable.

This exception to using only tabs for indentation is documented in the D-I coding style document.

-- 
To UNSUBSCRIBE, email to debian-boot-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Received on Fri Nov 30 12:42:12 2007

This archive was generated by hypermail 2.1.8 : Wed Mar 19 2008 - 03:35:27 EDT


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library