From aadb84a54799f328e3b7b2af4dd241bc4f33f9e1 Mon Sep 17 00:00:00 2001 From: Daniel Veillard Date: Fri, 17 Oct 2008 09:18:21 +0000 Subject: [PATCH] =?UTF-8?q?*=20src/domain=5Fconf.c:=20fix=20virDiskNameToB?= =?UTF-8?q?usDeviceIndex()=20to=20allow=200=20=20=20patch=20by=20Guido=20G?= =?UTF-8?q?=C3=BCnther=20Daniel?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ChangeLog | 5 +++++ src/domain_conf.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index f65fc67807..dfc2a9afb7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Fri Oct 17 11:16:30 CEST 2008 Daniel Veillard + + * src/domain_conf.c: fix virDiskNameToBusDeviceIndex() to allow 0 + patch by Guido Günther + Thu Oct 16 19:17:25 +0200 Jim Meyering build: when po-check fails, say why and suggest a fix diff --git a/src/domain_conf.c b/src/domain_conf.c index f59cdaf41a..2bade8dbe9 100644 --- a/src/domain_conf.c +++ b/src/domain_conf.c @@ -3394,12 +3394,12 @@ char *virDomainConfigFile(virConnectPtr conn, * @param devIdx parsed device number * @return 0 on success, -1 on failure */ -int virDiskNameToBusDeviceIndex(virDomainDiskDefPtr disk, +int virDiskNameToBusDeviceIndex(const virDomainDiskDefPtr disk, int *busIdx, int *devIdx) { int idx = virDiskNameToIndex(disk->dst); - if (idx < 1) + if (idx < 0) return -1; switch (disk->bus) {