On Sun, Oct 24, 2004 at 02:16:24PM -0400, Joey Hess wrote: > Andrew Pollock wrote: > > Patch attached. Will submit it to the BTS shortly. I'm doing some tests with > > qemu, but it's slooow. Would appreciate some testing by others... > > Wouldn't this behave badly if the user selected 0 partitions? An array > in degraded mode of zero partitions probably won't work.. Are there any > other lower bounds it should check to ensure that the result is a usable > array, even if in degraded mode? There's a loop that doesn't exit until the user has selected at least one partition. I tested that, and it works fine. It works the same way mdcfg currently does if the user doesn't select two partitions. This part of my patch: - # Loop until the correct amount of active devices has been selected - while [ "${SELECTED}" -ne "${DEV_COUNT}" ]; do + # Loop until at least one device has been selected + until [ "${SELECTED}" -gt "0" -a "${SELECTED}" -le "${DEV_COUNT}" ]; regards Andrew -- linux.conf.au 2005 - http://lca2005.linux.org.au/ - Birthplace of Tux April 18th to 23rd - http://lca2005.linux.org.au/ - LINUX Canberra, Australia - http://lca2005.linux.org.au/ - Get bitten!
Attachment:
signature.asc
Description: Digital signature