From: Daniel Veillard Date: Fri, 17 Oct 2008 09:18:21 +0000 (+0000) Subject: * src/domain_conf.c: fix virDiskNameToBusDeviceIndex() to allow 0 X-Git-Tag: LIBVIRT_0_5_0~129 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aadb84a54799f328e3b7b2af4dd241bc4f33f9e1;p=thirdparty%2Flibvirt.git * src/domain_conf.c: fix virDiskNameToBusDeviceIndex() to allow 0 patch by Guido Günther Daniel --- 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) {