commit
a18460b385ae03 converted from a fixed maximum number of devices
to dynamically growing the list via realloc, but didn't update the
error message shown on failure.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Dirk Wallenstein <halsmit@t-online.de>
Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
new_num_elems * sizeof (struct pci_device_private));
if (new_devs == NULL) {
(void) fprintf(stderr,
- "Maximum number of PCI devices found,"
- " discarding additional devices\n");
+ "Error allocating memory for PCI devices:"
+ " %s\n discarding additional devices\n",
+ strerror(errno));
return (rval);
}
(void) memset(&new_devs[pinfo->num_devices], 0,