In preparation for a future patch adding new virFile APIs.
* src/util/files.h, src/util/files.c: Move...
* src/util/virfile.h, src/util/virfile.c: ...here, and rename
functions to virFile prefix. Macro names are intentionally
left alone.
* *.c: All '#include "files.h"' uses changed.
* src/Makefile.am (UTIL_SOURCES): Reflect rename.
* cfg.mk (exclude_file_name_regexp--sc_prohibit_close): Likewise.
* src/libvirt_private.syms: Likewise.
* docs/hacking.html.in: Likewise.
* HACKING: Regenerate.
Usage of the "fdopen()", "close()", "fclose()" APIs is deprecated in libvirt
code base to help avoiding double-closing of files or file descriptors, which
is particulary dangerous in a multi-threaded applications. Instead of these
-APIs, use the macros from files.h
+APIs, use the macros from virfile.h
- Open a file from a file descriptor:
^(bootstrap.conf$$|src/util/util\.c$$|examples/domain-events/events-c/event-test\.c$$)
exclude_file_name_regexp--sc_prohibit_close = \
- (\.p[yl]$$|^docs/|^(src/util/files\.c|src/libvirt\.c)$$)
+ (\.p[yl]$$|^docs/|^(src/util/virfile\.c|src/libvirt\.c)$$)
exclude_file_name_regexp--sc_prohibit_empty_lines_at_EOF = \
(^tests/qemuhelpdata/|\.(gif|ico|png)$$)
#include "libvirt_internal.h"
#include "virterror_internal.h"
-#include "files.h"
+#include "virfile.h"
#define VIR_FROM_THIS VIR_FROM_QEMU
Usage of the <code>fdopen()</code>, <code>close()</code>, <code>fclose()</code>
APIs is deprecated in libvirt code base to help avoiding double-closing of files
or file descriptors, which is particulary dangerous in a multi-threaded
- applications. Instead of these APIs, use the macros from files.h
+ applications. Instead of these APIs, use the macros from virfile.h
</p>
<ul>
util/cgroup.c util/cgroup.h \
util/event.c util/event.h \
util/event_poll.c util/event_poll.h \
- util/files.c util/files.h \
util/hash.c util/hash.h \
util/hooks.c util/hooks.h \
util/iptables.c util/iptables.h \
util/uuid.c util/uuid.h \
util/util.c util/util.h \
util/viraudit.c util/viraudit.h \
+ util/virfile.c util/virfile.h \
util/xml.c util/xml.h \
util/virterror.c util/virterror_internal.h \
util/virkeycode.c util/virkeycode.h \
#include "nwfilter_conf.h"
#include "ignore-value.h"
#include "storage_file.h"
-#include "files.h"
+#include "virfile.h"
#include "bitmap.h"
#include "count-one-bits.h"
#include "util.h"
#include "buf.h"
#include "c-ctype.h"
-#include "files.h"
+#include "virfile.h"
#define MAX_BRIDGE_ID 256
#define VIR_FROM_THIS VIR_FROM_NETWORK
#include "nwfilter_conf.h"
#include "domain_conf.h"
#include "c-ctype.h"
-#include "files.h"
+#include "virfile.h"
#define VIR_FROM_THIS VIR_FROM_NWFILTER
#include "buf.h"
#include "util.h"
#include "memory.h"
-#include "files.h"
+#include "virfile.h"
#define VIR_FROM_THIS VIR_FROM_STORAGE
#include "xml.h"
#include "virterror_internal.h"
#include "uuid.h"
-#include "files.h"
+#include "virfile.h"
#define VIR_FROM_THIS VIR_FROM_STORAGE
#include "logging.h"
#include "memory.h"
#include "util.h"
-#include "files.h"
+#include "virfile.h"
#include "configmake.h"
#define VIR_FROM_THIS VIR_FROM_STREAMS
virFDStreamCreateFile;
-# files.h
-virClose;
-virFclose;
-virFdopen;
-
-
# hash.h
virHashAddEntry;
virHashCreate;
virAuditSend;
+# virfile.h
+virFileClose;
+virFileFclose;
+virFileFdopen;
+
+
# virterror_internal.h
virDispatchError;
virErrorMsg;
#include "logging.h"
#include "virterror_internal.h"
#include "datatypes.h"
-#include "files.h"
+#include "virfile.h"
#include "memory.h"
#include "uuid.h"
#include "capabilities.h"
#include "virterror_internal.h"
#include "conf.h"
#include "datatypes.h"
-#include "files.h"
+#include "virfile.h"
#include "memory.h"
#include "uuid.h"
#include "command.h"
#include "virterror_internal.h"
#include "memory.h"
#include "util.h"
-#include "files.h"
+#include "virfile.h"
#include "md5.h"
#include "conf.h"
#include "memory.h"
#include "veth.h"
#include "uuid.h"
-#include "files.h"
+#include "virfile.h"
#include "command.h"
#define VIR_FROM_THIS VIR_FROM_LXC
#include "veth.h"
#include "memory.h"
#include "util.h"
-#include "files.h"
+#include "virfile.h"
#define VIR_FROM_THIS VIR_FROM_LXC
#include "uuid.h"
#include "stats_linux.h"
#include "hooks.h"
-#include "files.h"
+#include "virfile.h"
#include "fdstream.h"
#include "domain_audit.h"
#include "domain_nwfilter.h"
#include "virterror_internal.h"
#include "memory.h"
#include "logging.h"
-#include "files.h"
+#include "virfile.h"
#include <dirent.h>
#define VIR_FROM_THIS VIR_FROM_NODEDEV
#include "virterror_internal.h"
#include "count-one-bits.h"
#include "intprops.h"
-#include "files.h"
+#include "virfile.h"
#define VIR_FROM_THIS VIR_FROM_NONE
#include "nwfilter_conf.h"
#include "nwfilter_gentech_driver.h"
#include "nwfilter_ebiptables_driver.h"
-#include "files.h"
+#include "virfile.h"
#include "command.h"
#include "memory.h"
#include "util.h"
#include "nodeinfo.h"
-#include "files.h"
+#include "virfile.h"
#include "command.h"
#include "ignore-value.h"
#include "nodeinfo.h"
#include "memory.h"
#include "bridge.h"
-#include "files.h"
+#include "virfile.h"
#include "logging.h"
#include "command.h"
#include "domain_conf.h"
#include "storage_conf.h"
#include "nodeinfo.h"
-#include "files.h"
+#include "virfile.h"
#include "interface_conf.h"
#include "phyp_driver.h"
#include "logging.h"
#include "virterror_internal.h"
#include "util.h"
-#include "files.h"
+#include "virfile.h"
#include "nodeinfo.h"
#include "cpu/cpu.h"
#include "domain_conf.h"
#include "logging.h"
#include "virterror_internal.h"
#include "util.h"
-#include "files.h"
+#include "virfile.h"
#include "uuid.h"
#include "c-ctype.h"
#include "domain_nwfilter.h"
#include "macvtap.h"
#include "cpu/cpu.h"
#include "domain_nwfilter.h"
-#include "files.h"
+#include "virfile.h"
#include "configmake.h"
#define VIR_FROM_THIS VIR_FROM_QEMU
#include "cpu/cpu.h"
#include "ignore-value.h"
#include "uuid.h"
-#include "files.h"
+#include "virfile.h"
#include <sys/time.h>
#include <fcntl.h>
#include "domain_nwfilter.h"
#include "hooks.h"
#include "storage_file.h"
-#include "files.h"
+#include "virfile.h"
#include "fdstream.h"
#include "configmake.h"
#include "threadpool.h"
#include "virterror_internal.h"
#include "memory.h"
#include "pci.h"
-#include "files.h"
+#include "virfile.h"
#include "qemu_cgroup.h"
#include "locking/domain_lock.h"
#include "virterror_internal.h"
#include "memory.h"
#include "util.h"
-#include "files.h"
+#include "virfile.h"
#include "datatypes.h"
#include "fdstream.h"
#include "uuid.h"
#include "virterror_internal.h"
#include "memory.h"
#include "logging.h"
-#include "files.h"
+#include "virfile.h"
#define VIR_FROM_THIS VIR_FROM_QEMU
#include "virterror_internal.h"
#include "memory.h"
#include "hooks.h"
-#include "files.h"
+#include "virfile.h"
#include "util.h"
#include "c-ctype.h"
#include "nodeinfo.h"
#include "qemu_protocol.h"
#include "memory.h"
#include "util.h"
-#include "files.h"
+#include "virfile.h"
#include "command.h"
#include "intprops.h"
#include "virnetsocket.h"
#include "memory.h"
#include "threads.h"
-#include "files.h"
+#include "virfile.h"
#include "logging.h"
#include "util.h"
#include "virterror_internal.h"
#include "threads.h"
#include "threadpool.h"
#include "util.h"
-#include "files.h"
+#include "virfile.h"
#include "event.h"
#if HAVE_AVAHI
# include "virnetservermdns.h"
#include "memory.h"
#include "virterror_internal.h"
#include "logging.h"
-#include "files.h"
+#include "virfile.h"
#include "event.h"
#include "threads.h"
#include "util.h"
#include "uuid.h"
#include "virterror_internal.h"
-#include "files.h"
+#include "virfile.h"
#include "configmake.h"
#define VIR_FROM_THIS VIR_FROM_SECRET
#include "uuid.h"
#include "pci.h"
#include "hostusb.h"
-#include "files.h"
+#include "virfile.h"
#include "configmake.h"
#include "command.h"
#include "pci.h"
#include "hostusb.h"
#include "storage_file.h"
-#include "files.h"
+#include "virfile.h"
#define VIR_FROM_THIS VIR_FROM_SECURITY
#include "uuid.h"
#include "hostusb.h"
#include "pci.h"
-#include "files.h"
+#include "virfile.h"
#include "configmake.h"
#define VIR_FROM_THIS VIR_FROM_SECURITY
#include "storage_file.h"
#include "storage_backend.h"
#include "logging.h"
-#include "files.h"
+#include "virfile.h"
#include "command.h"
#if WITH_STORAGE_LVM
#include "command.h"
#include "memory.h"
#include "xml.h"
-#include "files.h"
+#include "virfile.h"
#define VIR_FROM_THIS VIR_FROM_STORAGE
#include "util.h"
#include "memory.h"
#include "logging.h"
-#include "files.h"
+#include "virfile.h"
#include "command.h"
#define VIR_FROM_THIS VIR_FROM_STORAGE
#include "command.h"
#include "memory.h"
#include "logging.h"
-#include "files.h"
+#include "virfile.h"
#define VIR_FROM_THIS VIR_FROM_STORAGE
#include "storage_backend.h"
#include "memory.h"
#include "logging.h"
-#include "files.h"
+#include "virfile.h"
#define VIR_FROM_THIS VIR_FROM_STORAGE
#include "storage_backend_scsi.h"
#include "memory.h"
#include "logging.h"
-#include "files.h"
+#include "virfile.h"
#include "command.h"
#define VIR_FROM_THIS VIR_FROM_STORAGE
#include "memory.h"
#include "storage_backend.h"
#include "logging.h"
-#include "files.h"
+#include "virfile.h"
#include "fdstream.h"
#include "configmake.h"
#include "xml.h"
#include "threads.h"
#include "logging.h"
-#include "files.h"
+#include "virfile.h"
#define VIR_FROM_THIS VIR_FROM_TEST
#include "bridge.h"
#include "logging.h"
#include "domain_nwfilter.h"
-#include "files.h"
+#include "virfile.h"
#include "command.h"
#define VIR_FROM_THIS VIR_FROM_UML
#include "datatypes.h"
#include "logging.h"
#include "domain_nwfilter.h"
-#include "files.h"
+#include "virfile.h"
#include "fdstream.h"
#include "configmake.h"
#if defined(WITH_BRIDGE)
# include "bridge.h"
-# include "files.h"
+# include "virfile.h"
# include <stdlib.h>
# include <stdio.h>
#include "memory.h"
#include "cgroup.h"
#include "logging.h"
-#include "files.h"
+#include "virfile.h"
#include "hash.h"
#define CGROUP_MAX_VAL 512
#include "virterror_internal.h"
#include "util.h"
#include "logging.h"
-#include "files.h"
+#include "virfile.h"
#include "buf.h"
#include "ignore-value.h"
#include "verify.h"
#include "util.h"
#include "c-ctype.h"
#include "memory.h"
-#include "files.h"
+#include "virfile.h"
#define VIR_FROM_THIS VIR_FROM_CONF
#include "memory.h"
#include "virterror_internal.h"
#include "logging.h"
-#include "files.h"
+#include "virfile.h"
#define VIR_FROM_THIS VIR_FROM_NETWORK
#define DNSMASQ_HOSTSFILE_SUFFIX "hostsfile"
#include "event_poll.h"
#include "memory.h"
#include "util.h"
-#include "files.h"
+#include "virfile.h"
#include "ignore-value.h"
#include "virterror_internal.h"
+++ /dev/null
-/*
- * files.c: safer file handling
- *
- * Copyright (C) 2010-2011 Red Hat, Inc.
- * Copyright (C) 2010 IBM Corporation
- * Copyright (C) 2010 Stefan Berger
- * Copyright (C) 2010 Eric Blake
- *
- * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- */
-
-#include <config.h>
-
-#include <unistd.h>
-
-#include "files.h"
-
-int virClose(int *fdptr, bool preserve_errno)
-{
- int saved_errno;
- int rc = 0;
-
- if (*fdptr >= 0) {
- if (preserve_errno)
- saved_errno = errno;
- rc = close(*fdptr);
- *fdptr = -1;
- if (preserve_errno)
- errno = saved_errno;
- }
-
- return rc;
-}
-
-
-int virFclose(FILE **file, bool preserve_errno)
-{
- int saved_errno;
- int rc = 0;
-
- if (*file) {
- if (preserve_errno)
- saved_errno = errno;
- rc = fclose(*file);
- *file = NULL;
- if (preserve_errno)
- errno = saved_errno;
- }
-
- return rc;
-}
-
-
-FILE *virFdopen(int *fdptr, const char *mode)
-{
- FILE *file = NULL;
-
- if (*fdptr >= 0) {
- file = fdopen(*fdptr, mode);
- if (file)
- *fdptr = -1;
- } else {
- errno = EBADF;
- }
-
- return file;
-}
+++ /dev/null
-/*
- * files.h: safer file handling
- *
- * Copyright (C) 2010-2011 Red Hat, Inc.
- * Copyright (C) 2010 IBM Corporation
- * Copyright (C) 2010 Stefan Berger
- * Copyright (C) 2010 Eric Blake
- *
- * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- */
-
-
-#ifndef __VIR_FILES_H_
-# define __VIR_FILES_H_
-
-# include <stdio.h>
-
-# include "internal.h"
-# include "ignore-value.h"
-
-
-/* Don't call these directly - use the macros below */
-int virClose(int *fdptr, bool preserve_errno) ATTRIBUTE_RETURN_CHECK;
-int virFclose(FILE **file, bool preserve_errno) ATTRIBUTE_RETURN_CHECK;
-FILE *virFdopen(int *fdptr, const char *mode) ATTRIBUTE_RETURN_CHECK;
-
-/* For use on normal paths; caller must check return value,
- and failure sets errno per close. */
-# define VIR_CLOSE(FD) virClose(&(FD), false)
-# define VIR_FCLOSE(FILE) virFclose(&(FILE), false)
-
-/* Wrapper around fdopen that consumes fd on success. */
-# define VIR_FDOPEN(FD, MODE) virFdopen(&(FD), MODE)
-
-/* For use on cleanup paths; errno is unaffected by close,
- and no return value to worry about. */
-# define VIR_FORCE_CLOSE(FD) ignore_value(virClose(&(FD), true))
-# define VIR_FORCE_FCLOSE(FILE) ignore_value(virFclose(&(FILE), true))
-
-#endif /* __VIR_FILES_H */
#include "util.h"
#include "logging.h"
#include "memory.h"
-#include "files.h"
+#include "virfile.h"
#include "configmake.h"
#include "command.h"
#include "util.h"
#include "interface.h"
#include "virterror_internal.h"
-#include "files.h"
+#include "virfile.h"
#include "memory.h"
#include "netlink.h"
#include "util.h"
#include "threads.h"
-#include "files.h"
+#include "virfile.h"
#include "memory.h"
#include "virterror_internal.h"
#include "configmake.h"
#include "util.h"
#include "buf.h"
#include "threads.h"
-#include "files.h"
+#include "virfile.h"
#define VIR_FROM_THIS VIR_FROM_NONE
# include "interface.h"
# include "virterror_internal.h"
# include "uuid.h"
-# include "files.h"
+# include "virfile.h"
# include "netlink.h"
# define VIR_FROM_THIS VIR_FROM_NET
#include "memory.h"
#include "command.h"
#include "virterror_internal.h"
-#include "files.h"
+#include "virfile.h"
/* avoid compilation breakage on some systems */
#ifndef MODPROBE
# include "util.h"
# include "stats_linux.h"
# include "memory.h"
-# include "files.h"
+# include "virfile.h"
# define VIR_FROM_THIS VIR_FROM_STATS_LINUX
#include "memory.h"
#include "virterror_internal.h"
#include "logging.h"
-#include "files.h"
+#include "virfile.h"
#define VIR_FROM_THIS VIR_FROM_STORAGE
#include "memory.h"
#include "threads.h"
#include "verify.h"
-#include "files.h"
+#include "virfile.h"
#include "command.h"
#include "nonblocking.h"
#include "passfd.h"
#include "virterror_internal.h"
#include "logging.h"
#include "memory.h"
-#include "files.h"
+#include "virfile.h"
#ifndef ENODATA
# define ENODATA EIO
#include "logging.h"
#include "viraudit.h"
#include "util.h"
-#include "files.h"
+#include "virfile.h"
#include "memory.h"
/* Provide the macros in case the header file is old.
--- /dev/null
+/*
+ * virfile.c: safer file handling
+ *
+ * Copyright (C) 2010-2011 Red Hat, Inc.
+ * Copyright (C) 2010 IBM Corporation
+ * Copyright (C) 2010 Stefan Berger
+ * Copyright (C) 2010 Eric Blake
+ *
+ * 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ */
+
+#include <config.h>
+
+#include <unistd.h>
+
+#include "virfile.h"
+
+int virFileClose(int *fdptr, bool preserve_errno)
+{
+ int saved_errno;
+ int rc = 0;
+
+ if (*fdptr >= 0) {
+ if (preserve_errno)
+ saved_errno = errno;
+ rc = close(*fdptr);
+ *fdptr = -1;
+ if (preserve_errno)
+ errno = saved_errno;
+ }
+
+ return rc;
+}
+
+
+int virFileFclose(FILE **file, bool preserve_errno)
+{
+ int saved_errno;
+ int rc = 0;
+
+ if (*file) {
+ if (preserve_errno)
+ saved_errno = errno;
+ rc = fclose(*file);
+ *file = NULL;
+ if (preserve_errno)
+ errno = saved_errno;
+ }
+
+ return rc;
+}
+
+
+FILE *virFileFdopen(int *fdptr, const char *mode)
+{
+ FILE *file = NULL;
+
+ if (*fdptr >= 0) {
+ file = fdopen(*fdptr, mode);
+ if (file)
+ *fdptr = -1;
+ } else {
+ errno = EBADF;
+ }
+
+ return file;
+}
--- /dev/null
+/*
+ * virfile.h: safer file handling
+ *
+ * Copyright (C) 2010-2011 Red Hat, Inc.
+ * Copyright (C) 2010 IBM Corporation
+ * Copyright (C) 2010 Stefan Berger
+ * Copyright (C) 2010 Eric Blake
+ *
+ * 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ */
+
+
+#ifndef __VIR_FILES_H_
+# define __VIR_FILES_H_
+
+# include <stdio.h>
+
+# include "internal.h"
+# include "ignore-value.h"
+
+
+/* Don't call these directly - use the macros below */
+int virFileClose(int *fdptr, bool preserve_errno) ATTRIBUTE_RETURN_CHECK;
+int virFileFclose(FILE **file, bool preserve_errno) ATTRIBUTE_RETURN_CHECK;
+FILE *virFileFdopen(int *fdptr, const char *mode) ATTRIBUTE_RETURN_CHECK;
+
+/* For use on normal paths; caller must check return value,
+ and failure sets errno per close. */
+# define VIR_CLOSE(FD) virFileClose(&(FD), false)
+# define VIR_FCLOSE(FILE) virFileFclose(&(FILE), false)
+
+/* Wrapper around fdopen that consumes fd on success. */
+# define VIR_FDOPEN(FD, MODE) virFileFdopen(&(FD), MODE)
+
+/* For use on cleanup paths; errno is unaffected by close,
+ and no return value to worry about. */
+# define VIR_FORCE_CLOSE(FD) ignore_value(virFileClose(&(FD), true))
+# define VIR_FORCE_FCLOSE(FILE) ignore_value(virFileFclose(&(FILE), true))
+
+#endif /* __VIR_FILES_H */
#include "logging.h"
#include "vbox_driver.h"
#include "configmake.h"
-#include "files.h"
+#include "virfile.h"
#include "fdstream.h"
/* This one changes from version to version. */
#include "dirname.h"
#include "memory.h"
#include "nodeinfo.h"
-#include "files.h"
+#include "virfile.h"
#include "uuid.h"
#include "virterror_internal.h"
#include "vmx.h"
#include "internal.h"
#include "virterror_internal.h"
#include "datatypes.h"
-#include "files.h"
+#include "virfile.h"
#include "memory.h"
#include "uuid.h"
#include "command.h"
# include "util.h"
# include "block_stats.h"
# include "memory.h"
-# include "files.h"
+# include "virfile.h"
# define VIR_FROM_THIS VIR_FROM_STATS_LINUX
#include "pci.h"
#include "uuid.h"
#include "fdstream.h"
-#include "files.h"
+#include "virfile.h"
#include "command.h"
#define VIR_FROM_THIS VIR_FROM_XEN
#include "buf.h"
#include "capabilities.h"
#include "memory.h"
-#include "files.h"
+#include "virfile.h"
#define VIR_FROM_THIS VIR_FROM_XEN
#include "xend_internal.h"
#include "logging.h"
#include "uuid.h"
-#include "files.h"
+#include "virfile.h"
#include "xm_internal.h" /* for xenXMDomainConfigParse */
#include "xs_internal.h" /* To extract VNC port & Serial console TTY */
#include "memory.h"
#include "count-one-bits.h"
-#include "files.h"
+#include "virfile.h"
/* required for cpumap_t */
#include <xen/dom0_ops.h>
#include "internal.h"
#include "util.h"
#include "memory.h"
-#include "files.h"
+#include "virfile.h"
static int envsort(const void *a, const void *b) {
#include "util.h"
#include "memory.h"
#include "command.h"
-#include "files.h"
+#include "virfile.h"
#ifdef WIN32
#include "internal.h"
#include "nodeinfo.h"
#include "util.h"
-#include "files.h"
+#include "virfile.h"
#if ! (defined __linux__ && (defined(__x86_64__) || \
defined(__amd64__) || \
((((int) ((T)->tv_sec - (U)->tv_sec)) * 1000000.0 + \
((int) ((T)->tv_usec - (U)->tv_usec))) / 1000.0)
-#include "files.h"
+#include "virfile.h"
static unsigned int testDebug = -1;
static unsigned int testVerbose = -1;
#include "virterror_internal.h"
#include "memory.h"
#include "logging.h"
-#include "files.h"
+#include "virfile.h"
#include "rpc/virnetsocket.h"
#include "xml.h"
#include "testutils.h"
#include "xen/xen_hypervisor.h"
-#include "files.h"
+#include "virfile.h"
static int
testCompareFiles(const char *hostmachine, const char *xml_rel,
# include "console.h"
# include "logging.h"
# include "util.h"
-# include "files.h"
+# include "virfile.h"
# include "memory.h"
# include "virterror_internal.h"
#include "memory.h"
#include "xml.h"
#include "libvirt/libvirt-qemu.h"
-#include "files.h"
+#include "virfile.h"
#include "event_poll.h"
#include "configmake.h"
#include "threads.h"