bdev: Enumerate virtio-scsi devices from 0

Starting with a8c375ad, virtio-scsi devices are enumerated from 1. This
is a change in previous behaviour where devices were enumerated from 0.
This commit restore the behaviour of the last stable SPDK release.

Change-Id: Ia8e7dc13e0831e603af831eeab67796025fce417
Signed-off-by: Felipe Franciosi <felipe@nutanix.com>
Reviewed-on: https://review.gerrithub.io/391085
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
Felipe Franciosi 2017-11-29 07:53:27 +00:00 committed by Ben Walker
parent 3ef479ab16
commit edd03d6ce1

View File

@ -151,7 +151,7 @@ virtio_pci_scsi_dev_create_cb(struct virtio_pci_ctx *pci_ctx)
}
vdev = &svdev->vdev;
name = spdk_sprintf_alloc("VirtioScsi%"PRIu32, ++pci_dev_counter);
name = spdk_sprintf_alloc("VirtioScsi%"PRIu32, pci_dev_counter++);
if (name == NULL) {
free(vdev);
return -1;