aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/hw/esp-scsi.c2
-rw-r--r--src/hw/lsi-scsi.c2
-rw-r--r--src/hw/megasas.c3
-rw-r--r--src/hw/pvscsi.c2
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);