The attached patch was submitted by qvha <qvha@ubisoft.com>, to
allow "param=-1" (e.g.). It seems appropriate...
--
Chip Salzenberg - a.k.a. - <chip@perlsupport.com>
"There -- we made them swerve slightly!" //MST3K
--17pEHd4RhPHOinZp
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=patch
Index: init/main.c
***************
*** 8,11 ****
--- 8,12 ----
* Moan early if gcc is old, avoiding bogus kernels - Paul Gortmaker, May '96
* Simplified starting of init: Michael A. Griffith <grif@acm.org>
+ * get_options takes negative integers for linear RAID (-1) - HA Quoc-Viet Oct'98
*/
*************** char *get_options(char *str, int *ints)
*** 375,382 ****
{
char *cur = str;
! int i=1;
! while (cur && isdigit(*cur) && i <= 10) {
! ints[i++] = simple_strtoul(cur,NULL,0);
if ((cur = strchr(cur,',')) != NULL)
cur++;
--- 376,390 ----
{
char *cur = str;
! int i=1,sign=1;
! while ( cur && i<=10 &&
! ( ( *cur=='-' && isdigit(cur[1]) ) || isdigit(*cur) ) )
! {
! if ( *cur=='-' )
! {
! sign=-1;
! cur++;
! }
! ints[i++] = sign * simple_strtoul(cur,NULL,0);
if ((cur = strchr(cur,',')) != NULL)
cur++;
--17pEHd4RhPHOinZp--
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/