diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2016-02-03 03:27:36 -0500 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2016-02-03 10:38:42 -0500 |
commit | 937ca6f78cd8611fa1cccb9c42b9184594b05de7 (patch) | |
tree | 94dd25e22166e03462c495b015b43ef430c23851 | |
parent | 4d8510cdcca0a6b160bb8dc3a254ab0baacb10f6 (diff) | |
download | seabios-hppa-937ca6f78cd8611fa1cccb9c42b9184594b05de7.zip seabios-hppa-937ca6f78cd8611fa1cccb9c42b9184594b05de7.tar.gz seabios-hppa-937ca6f78cd8611fa1cccb9c42b9184594b05de7.tar.bz2 |
scsi: Always use MAXDESCSIZE when building drive description
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
-rw-r--r-- | src/hw/esp-scsi.c | 2 | ||||
-rw-r--r-- | src/hw/lsi-scsi.c | 2 | ||||
-rw-r--r-- | src/hw/megasas.c | 3 | ||||
-rw-r--r-- | src/hw/pvscsi.c | 2 |
4 files changed, 5 insertions, 4 deletions
diff --git a/src/hw/esp-scsi.c b/src/hw/esp-scsi.c index 086a032..c98989c 100644 --- a/src/hw/esp-scsi.c +++ b/src/hw/esp-scsi.c @@ -168,7 +168,7 @@ esp_scsi_add_lun(struct pci_device *pci, u32 iobase, u8 target, u8 lun) llun->lun = lun; llun->iobase = iobase; - char *name = znprintf(16, "esp %pP %d:%d", pci, target, lun); + char *name = znprintf(MAXDESCSIZE, "esp %pP %d:%d", pci, target, lun); int prio = bootprio_find_scsi_device(pci, target, lun); int ret = scsi_drive_setup(&llun->drive, name, prio); free(name); diff --git a/src/hw/lsi-scsi.c b/src/hw/lsi-scsi.c index 564c9f1..fd695fa 100644 --- a/src/hw/lsi-scsi.c +++ b/src/hw/lsi-scsi.c @@ -147,7 +147,7 @@ lsi_scsi_add_lun(struct pci_device *pci, u32 iobase, u8 target, u8 lun) llun->lun = lun; llun->iobase = iobase; - char *name = znprintf(16, "lsi %pP %d:%d", pci, target, lun); + char *name = znprintf(MAXDESCSIZE, "lsi %pP %d:%d", pci, target, lun); int prio = bootprio_find_scsi_device(pci, target, lun); int ret = scsi_drive_setup(&llun->drive, name, prio); free(name); diff --git a/src/hw/megasas.c b/src/hw/megasas.c index 2ee457b..7514164 100644 --- a/src/hw/megasas.c +++ b/src/hw/megasas.c @@ -225,7 +225,8 @@ megasas_add_lun(struct pci_device *pci, u32 iobase, u8 target, u8 lun) free(mlun); return -1; } - name = znprintf(36, "MegaRAID SAS (PCI %pP) LD %d:%d", pci, target, lun); + name = znprintf(MAXDESCSIZE, "MegaRAID SAS (PCI %pP) LD %d:%d" + , pci, target, lun); prio = bootprio_find_scsi_device(pci, target, lun); ret = scsi_drive_setup(&mlun->drive, name, prio); free(name); diff --git a/src/hw/pvscsi.c b/src/hw/pvscsi.c index e1685b3..a9d118b 100644 --- a/src/hw/pvscsi.c +++ b/src/hw/pvscsi.c @@ -272,7 +272,7 @@ pvscsi_add_lun(struct pci_device *pci, void *iobase, plun->iobase = iobase; plun->ring_dsc = ring_dsc; - char *name = znprintf(16, "pvscsi %pP %d:%d", pci, target, lun); + char *name = znprintf(MAXDESCSIZE, "pvscsi %pP %d:%d", pci, target, lun); int prio = bootprio_find_scsi_device(pci, target, lun); int ret = scsi_drive_setup(&plun->drive, name, prio); free(name); |