* src/domain_conf.c: fix virDiskNameToBusDeviceIndex() to allow 0

patch by Guido Günther
Daniel
This commit is contained in:
Daniel Veillard 2008-10-17 09:18:21 +00:00
parent c16d74a12a
commit aadb84a547
2 changed files with 7 additions and 2 deletions

View File

@ -1,3 +1,8 @@
Fri Oct 17 11:16:30 CEST 2008 Daniel Veillard <veillard@redhat.com>
* src/domain_conf.c: fix virDiskNameToBusDeviceIndex() to allow 0
patch by Guido Günther
Thu Oct 16 19:17:25 +0200 Jim Meyering <meyering@redhat.com> Thu Oct 16 19:17:25 +0200 Jim Meyering <meyering@redhat.com>
build: when po-check fails, say why and suggest a fix build: when po-check fails, say why and suggest a fix

View File

@ -3394,12 +3394,12 @@ char *virDomainConfigFile(virConnectPtr conn,
* @param devIdx parsed device number * @param devIdx parsed device number
* @return 0 on success, -1 on failure * @return 0 on success, -1 on failure
*/ */
int virDiskNameToBusDeviceIndex(virDomainDiskDefPtr disk, int virDiskNameToBusDeviceIndex(const virDomainDiskDefPtr disk,
int *busIdx, int *busIdx,
int *devIdx) { int *devIdx) {
int idx = virDiskNameToIndex(disk->dst); int idx = virDiskNameToIndex(disk->dst);
if (idx < 1) if (idx < 0)
return -1; return -1;
switch (disk->bus) { switch (disk->bus) {