Re: kernel panic in SoftwareRAID autodetection

From: Peter Samuelson (peter@cadcamlab.org)
Date: Tue Dec 05 2000 - 19:36:57 EST


[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/



This archive was generated by hypermail 2b29 : Thu Dec 07 2000 - 21:00:14 EST