diff options
author | mjacob <mjacob@FreeBSD.org> | 2010-05-11 22:22:01 +0000 |
---|---|---|
committer | mjacob <mjacob@FreeBSD.org> | 2010-05-11 22:22:01 +0000 |
commit | 1676f7d82f0236edf42b3577ef49e8477fc3b0f0 (patch) | |
tree | 3b1037f4ebe6b592c37728c1964609d28f420c20 /sys | |
parent | 4d95c325ddc0a2cee03abd4ff6cf7eaf0e75e888 (diff) | |
download | FreeBSD-src-1676f7d82f0236edf42b3577ef49e8477fc3b0f0.zip FreeBSD-src-1676f7d82f0236edf42b3577ef49e8477fc3b0f0.tar.gz |
Deal sensibly with more than 26 sg devices. It isn't a complete
solution.
Sponsored by: Panasas
MFC after: 1 week
Diffstat (limited to 'sys')
-rw-r--r-- | sys/cam/scsi/scsi_sg.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/cam/scsi/scsi_sg.c b/sys/cam/scsi/scsi_sg.c index 8ec0189..de20731 100644 --- a/sys/cam/scsi/scsi_sg.c +++ b/sys/cam/scsi/scsi_sg.c @@ -303,7 +303,12 @@ sgregister(struct cam_periph *periph, void *arg) softc->dev = make_dev(&sg_cdevsw, periph->unit_number, UID_ROOT, GID_OPERATOR, 0600, "%s%d", periph->periph_name, periph->unit_number); - (void)make_dev_alias(softc->dev, "sg%c", 'a' + periph->unit_number); + if (periph->unit_number < 26) { + (void)make_dev_alias(softc->dev, "sg%c", periph->unit_number + 'a'); + } else { + (void)make_dev_alias(softc->dev, "sg%c%c", + ((periph->unit_number / 26) - 1) + 'a', periph->unit_number + 'a'); + } cam_periph_lock(periph); softc->dev->si_drv1 = periph; |