Re: Isn't sd_major() broken ?

From: Pete Zaitcev (zaitcev@redhat.com)
Date: Thu Apr 10 2003 - 15:39:34 EST


> --- drivers/scsi/sd.c.org Wed Apr 9 13:12:38 2003
> +++ drivers/scsi/sd.c Thu Apr 10 11:01:45 2003
> @@ -123,7 +123,7 @@ static int sd_major(int major_idx)
> case 1 ... 7:
> return SCSI_DISK1_MAJOR + major_idx - 1;
> case 8 ... 15:
> - return SCSI_DISK8_MAJOR + major_idx;
> + return SCSI_DISK8_MAJOR + major_idx - 8;
> default:
> BUG();
> return 0; /* shut up gcc */
>

Yes this seems good.

One is left to wonder, however, why 2.5 version is not using
a little array of majors here.

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



This archive was generated by hypermail 2b29 : Tue Apr 15 2003 - 22:00:21 EST