From c25bc5c83151c5eca9f3525777bf5c11bee6b205 Mon Sep 17 00:00:00 2001 From: Michal Privoznik Date: Tue, 20 Aug 2019 12:13:49 +0200 Subject: [PATCH] qemu: Drop unused qemuOpenPCIConfig() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit After previous commits, the function is not used anymore. Remove it. Signed-off-by: Michal Privoznik Reviewed-by: Ján Tomko Reviewed-by: Daniel Henrique Barboza Tested-by: Daniel Henrique Barboza --- src/qemu/qemu_command.c | 22 ---------------------- src/qemu/qemu_command.h | 2 -- 2 files changed, 24 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 520da8222c..49652a8565 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -4878,28 +4878,6 @@ qemuBuildVideoCommandLine(virCommandPtr cmd, } -int -qemuOpenPCIConfig(virDomainHostdevDefPtr dev) -{ - virDomainHostdevSubsysPCIPtr pcisrc = &dev->source.subsys.u.pci; - char *path = NULL; - int configfd = -1; - - if (virAsprintf(&path, "/sys/bus/pci/devices/%04x:%02x:%02x.%01x/config", - pcisrc->addr.domain, pcisrc->addr.bus, - pcisrc->addr.slot, pcisrc->addr.function) < 0) - return -1; - - configfd = open(path, O_RDWR, 0); - - if (configfd < 0) - virReportSystemError(errno, _("Failed opening %s"), path); - - VIR_FREE(path); - - return configfd; -} - char * qemuBuildPCIHostdevDevStr(const virDomainDef *def, virDomainHostdevDefPtr dev, diff --git a/src/qemu/qemu_command.h b/src/qemu/qemu_command.h index e3983bedb2..6f97e7bc0c 100644 --- a/src/qemu/qemu_command.h +++ b/src/qemu/qemu_command.h @@ -157,8 +157,6 @@ int qemuBuildRNGBackendProps(virDomainRNGDefPtr rng, virQEMUCapsPtr qemuCaps, virJSONValuePtr *props); -int qemuOpenPCIConfig(virDomainHostdevDefPtr dev); - /* Current, best practice */ char *qemuBuildUSBHostdevDevStr(const virDomainDef *def, virDomainHostdevDefPtr dev, -- GitLab