lkml.org 
[lkml]   [2000]   [Dec]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: kernel panic in SoftwareRAID autodetection
From

[Roberto Ragusa]
> BTW, here is a little patch regarding a silly problem I found
> about RAID partitions naming (/proc/partitions).
> No more "md8" "md9" "md:" "md;" ... but "md8" "md9" "md10" "md11" ...
> Well, this patch should work up to "md99".

This stuff *really* should be split out into the drivers. Brian Kress
had a patch against test11 for this. Brian? You want to fold in this
fix?

> + if (unit<10) {
> + sprintf(buf, "%s%c", maj, '0' + unit);
> + return buf;
> + }
> + else {
> + sprintf(buf, "%s%c%c", maj, '0' + unit / 10, '0' + unit % 10);
> + return buf;
> + }

Errrm, that's ugly. (: Use %d, unless I'm missing something:

sprintf(buf, "%s%d", maj, unit);

Peter
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:51    [W:0.112 / U:2.756 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site