]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: Remove qemu_hotplugpriv.h and qemuDomainRemoveDeviceWaitTime
authorDaniel Henrique Barboza <danielhb413@gmail.com>
Fri, 18 Oct 2019 18:36:33 +0000 (15:36 -0300)
committerCole Robinson <crobinso@redhat.com>
Wed, 13 Nov 2019 20:03:40 +0000 (15:03 -0500)
qemu_hotplugpriv.h is a header file created to share a global variable
called 'qemuDomainRemoveDeviceWaitTime', declared in qemu_hotplug.c,
to other files that would want to change the timeout value
(currently, only tests/qemuhotplugtest.c).

Previous patch deprecated the variable, using qemu_driver->unplugTimeout
to set the timeout instead. This means that the header file is now
unused, and can be safely discarded.

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
src/qemu/Makefile.inc.am
src/qemu/qemu_hotplug.c
src/qemu/qemu_hotplugpriv.h [deleted file]
tests/qemuhotplugtest.c

index 54f47c9fba1b6c76661cf3f57a29c8158aa6351c..bf30f8a3c5f6174ade19e88edd29175962f35b7f 100644 (file)
@@ -29,7 +29,6 @@ QEMU_DRIVER_SOURCES = \
        qemu/qemu_hostdev.h \
        qemu/qemu_hotplug.c \
        qemu/qemu_hotplug.h \
-       qemu/qemu_hotplugpriv.h \
        qemu/qemu_conf.c \
        qemu/qemu_conf.h \
        qemu/qemu_interop_config.c \
index 4e2921d113eca903e76b6e339768b958699470b1..522755ae4b0187ea52072a8b128e9dd5aad29663 100644 (file)
@@ -23,8 +23,6 @@
 #include <config.h>
 
 #include "qemu_hotplug.h"
-#define LIBVIRT_QEMU_HOTPLUGPRIV_H_ALLOW
-#include "qemu_hotplugpriv.h"
 #include "qemu_alias.h"
 #include "qemu_capabilities.h"
 #include "qemu_domain.h"
@@ -70,9 +68,6 @@ VIR_LOG_INIT("qemu.qemu_hotplug");
 #define QEMU_UNPLUG_TIMEOUT 1000ull * 5
 #define QEMU_UNPLUG_TIMEOUT_PPC64 1000ull * 10
 
-/* Wait up to 5 seconds for device removal to finish. */
-unsigned long long qemuDomainRemoveDeviceWaitTime = 1000ull * 5;
-
 
 static void
 qemuDomainResetDeviceRemoval(virDomainObjPtr vm);
diff --git a/src/qemu/qemu_hotplugpriv.h b/src/qemu/qemu_hotplugpriv.h
deleted file mode 100644 (file)
index a5c443b..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * qemu_hotplugpriv.h: private declarations for QEMU device hotplug management
- *
- * Copyright (C) 2013 Red Hat, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library.  If not, see
- * <http://www.gnu.org/licenses/>.
- *
- */
-
-#ifndef LIBVIRT_QEMU_HOTPLUGPRIV_H_ALLOW
-# error "qemu_hotplugpriv.h may only be included by qemu_hotplug.c or test suites"
-#endif /* LIBVIRT_QEMU_HOTPLUGPRIV_H_ALLOW */
-
-#pragma once
-
-/*
- * This header file should never be used outside unit tests.
- */
-
-extern unsigned long long qemuDomainRemoveDeviceWaitTime;
index a23fa3e37d1aa6c24d255de90b1304c35f32c197..a0a579f29aeae7be7b902274733a44cfb678fa3c 100644 (file)
@@ -22,8 +22,6 @@
 #include "qemu/qemu_alias.h"
 #include "qemu/qemu_conf.h"
 #include "qemu/qemu_hotplug.h"
-#define LIBVIRT_QEMU_HOTPLUGPRIV_H_ALLOW
-#include "qemu/qemu_hotplugpriv.h"
 #include "qemumonitortestutils.h"
 #include "testutils.h"
 #include "testutilsqemu.h"
@@ -635,8 +633,6 @@ mymain(void)
 
     driver.hostdevMgr = virHostdevManagerGetDefault();
 
-    /* wait only 100ms for DEVICE_DELETED event */
-    qemuDomainRemoveDeviceWaitTime = 100;
 
 #define DO_TEST(file, ACTION, dev, fial, kep, ...) \
     do { \