From nobody Wed May 14 18:40:13 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1519227351339777.5789553992919; Wed, 21 Feb 2018 07:35:51 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DF1552AD63; Wed, 21 Feb 2018 15:35:49 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id ADED6608F6; Wed, 21 Feb 2018 15:35:49 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 6ECB64A476; Wed, 21 Feb 2018 15:35:49 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w1LFZa5W020957 for ; Wed, 21 Feb 2018 10:35:36 -0500 Received: by smtp.corp.redhat.com (Postfix) id 63C2610A9717; Wed, 21 Feb 2018 15:35:36 +0000 (UTC) Received: from t460.redhat.com (unknown [10.33.36.87]) by smtp.corp.redhat.com (Postfix) with ESMTP id B9FCD10A9711; Wed, 21 Feb 2018 15:35:35 +0000 (UTC) From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Date: Wed, 21 Feb 2018 15:35:20 +0000 Message-Id: <20180221153525.14973-6-berrange@redhat.com> In-Reply-To: <20180221153525.14973-1-berrange@redhat.com> References: <20180221153525.14973-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 05/10] daemon: move libvirtd code into src/remote/ directory X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Wed, 21 Feb 2018 15:35:50 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Having a daemon/ directory makes little sense from a code structure point of view, as 90% of the code that is built into libvirtd already lives in the src/ directory. The virtlockd and virlogd daemons also live entirely in src/{locking,logging} directories. This moves the source code for libvirtd into src/remote/, alongside the client code. Signed-off-by: Daniel P. Berrang=C3=A9 --- .gitignore | 2 + daemon/Makefile.am | 125 +----------------= ---- src/Makefile.am | 93 ++++++++++++++- daemon/libvirtd.c =3D> src/remote/remote_daemon.c | 10 +- daemon/libvirtd.h =3D> src/remote/remote_daemon.h | 10 +- .../remote/remote_daemon_config.c | 10 +- .../remote/remote_daemon_config.h | 10 +- .../remote/remote_daemon_dispatch.c | 16 +-- .../remote/remote_daemon_dispatch.h | 10 +- .../stream.c =3D> src/remote/remote_daemon_stream.c | 8 +- .../stream.h =3D> src/remote/remote_daemon_stream.h | 12 +- 11 files changed, 136 insertions(+), 170 deletions(-) rename daemon/libvirtd.c =3D> src/remote/remote_daemon.c (99%) rename daemon/libvirtd.h =3D> src/remote/remote_daemon.h (93%) rename daemon/libvirtd-config.c =3D> src/remote/remote_daemon_config.c (98= %) rename daemon/libvirtd-config.h =3D> src/remote/remote_daemon_config.h (92= %) rename daemon/remote.c =3D> src/remote/remote_daemon_dispatch.c (99%) rename daemon/remote.h =3D> src/remote/remote_daemon_dispatch.h (85%) rename daemon/stream.c =3D> src/remote/remote_daemon_stream.c (99%) rename daemon/stream.h =3D> src/remote/remote_daemon_stream.h (85%) diff --git a/.gitignore b/.gitignore index 189116a3d0..415d6d166b 100644 --- a/.gitignore +++ b/.gitignore @@ -139,6 +139,7 @@ /src/libvirt_*helper /src/libvirt_*probes.h /src/libvirt_lxc +/src/libvirtd /src/locking/libxl-lockd.conf /src/locking/libxl-sanlock.conf /src/locking/lock_daemon_dispatch_stubs.h @@ -157,6 +158,7 @@ /src/qemu/test_libvirtd_qemu.aug /src/remote/*_client_bodies.h /src/remote/*_protocol.[ch] +/src/remote/*_stubs.h /src/rpc/virkeepaliveprotocol.[ch] /src/rpc/virnetprotocol.[ch] /src/test_libvirt*.aug diff --git a/daemon/Makefile.am b/daemon/Makefile.am index 42d8f7b3fd..4f682fa740 100644 --- a/daemon/Makefile.am +++ b/daemon/Makefile.am @@ -16,37 +16,8 @@ ## License along with this library. If not, see ## . =20 -INCLUDES =3D \ - -I$(top_builddir)/gnulib/lib -I$(top_srcdir)/gnulib/lib \ - -I$(top_srcdir) \ - -I$(top_builddir)/include -I$(top_srcdir)/include \ - -I$(top_builddir)/src -I$(top_srcdir)/src \ - -I$(top_srcdir)/src/util \ - -I$(top_srcdir)/src/conf \ - -I$(top_srcdir)/src/rpc \ - -I$(top_srcdir)/src/remote \ - -I$(top_srcdir)/src/admin \ - -I$(top_srcdir)/src/access \ - $(GETTEXT_CPPFLAGS) - CLEANFILES =3D =20 -WARN_CFLAGS +=3D $(STRICT_FRAME_LIMIT_CFLAGS) - -DAEMON_GENERATED =3D \ - remote_dispatch.h \ - lxc_dispatch.h \ - qemu_dispatch.h \ - $(NULL) - -DAEMON_SOURCES =3D \ - libvirtd.c libvirtd.h \ - remote.c remote.h \ - stream.c stream.h \ - $(DAEMON_GENERATED) - -LIBVIRTD_CONF_SOURCES =3D libvirtd-config.c libvirtd-config.h - PODFILES =3D \ libvirtd.pod \ $(NULL) @@ -57,9 +28,6 @@ MANINFILES =3D \ =20 DISTCLEANFILES =3D EXTRA_DIST =3D \ - remote_dispatch.h \ - lxc_dispatch.h \ - qemu_dispatch.h \ libvirtd.conf \ libvirtd.init.in \ libvirtd.upstart \ @@ -80,59 +48,14 @@ EXTRA_DIST =3D \ THREADS.txt \ $(PODFILES) \ $(MANINFILES) \ - $(DAEMON_SOURCES) \ - $(LIBVIRTD_CONF_SOURCES) \ $(NULL) =20 BUILT_SOURCES =3D =20 -REMOTE_PROTOCOL =3D $(top_srcdir)/src/remote/remote_protocol.x -LXC_PROTOCOL =3D $(top_srcdir)/src/remote/lxc_protocol.x -QEMU_PROTOCOL =3D $(top_srcdir)/src/remote/qemu_protocol.x -ADMIN_PROTOCOL =3D $(top_srcdir)/src/admin/admin_protocol.x - -remote_dispatch.h: $(top_srcdir)/src/rpc/gendispatch.pl \ - $(REMOTE_PROTOCOL) Makefile.am - $(AM_V_GEN)$(PERL) -w $(top_srcdir)/src/rpc/gendispatch.pl \ - --mode=3Dserver remote REMOTE $(REMOTE_PROTOCOL) \ - > $(srcdir)/remote_dispatch.h - -lxc_dispatch.h: $(top_srcdir)/src/rpc/gendispatch.pl \ - $(LXC_PROTOCOL) Makefile.am - $(AM_V_GEN)$(PERL) -w $(top_srcdir)/src/rpc/gendispatch.pl \ - --mode=3Dserver lxc LXC $(LXC_PROTOCOL) \ - > $(srcdir)/lxc_dispatch.h - -qemu_dispatch.h: $(top_srcdir)/src/rpc/gendispatch.pl \ - $(QEMU_PROTOCOL) Makefile.am - $(AM_V_GEN)$(PERL) -w $(top_srcdir)/src/rpc/gendispatch.pl \ - --mode=3Dserver qemu QEMU $(QEMU_PROTOCOL) \ - > $(srcdir)/qemu_dispatch.h - if WITH_LIBVIRTD =20 -# Build a convenience library, for reuse in tests/libvirtdconftest -noinst_LTLIBRARIES =3D libvirtd_conf.la -libvirtd_conf_la_SOURCES =3D $(LIBVIRTD_CONF_SOURCES) -libvirtd_conf_la_CFLAGS =3D \ - $(LIBXML_CFLAGS) \ - $(XDR_CFLAGS) \ - $(WARN_CFLAGS) $(PIE_CFLAGS) \ - $(COVERAGE_CFLAGS) \ - $(NULL) -libvirtd_conf_la_LDFLAGS =3D \ - $(RELRO_LDFLAGS) \ - $(PIE_LDFLAGS) \ - $(COVERAGE_LDFLAGS) \ - $(NO_INDIRECT_LDFLAGS) \ - $(NO_UNDEFINED_LDFLAGS) \ - $(NULL) -libvirtd_conf_la_LIBADD =3D $(LIBXML_LIBS) - man8_MANS =3D libvirtd.8 =20 -sbin_PROGRAMS =3D libvirtd - confdir =3D $(sysconfdir)/libvirt/ conf_DATA =3D libvirtd.conf =20 @@ -144,44 +67,6 @@ augeastests_DATA =3D test_libvirtd.aug =20 CLEANFILES +=3D test_libvirtd.aug =20 -libvirtd_SOURCES =3D $(DAEMON_SOURCES) - -#-D_XOPEN_SOURCE=3D600 -D_XOPEN_SOURCE_EXTENDED=3D1 -D_POSIX_C_SOURCE=3D19= 9506L -libvirtd_CFLAGS =3D \ - $(LIBXML_CFLAGS) $(GNUTLS_CFLAGS) $(SASL_CFLAGS) \ - $(XDR_CFLAGS) $(DBUS_CFLAGS) $(LIBNL_CFLAGS) \ - $(WARN_CFLAGS) $(PIE_CFLAGS) \ - $(COVERAGE_CFLAGS) \ - -DQEMUD_PID_FILE=3D"\"$(QEMUD_PID_FILE)\"" - -libvirtd_LDFLAGS =3D \ - $(RELRO_LDFLAGS) \ - $(PIE_LDFLAGS) \ - $(COVERAGE_LDFLAGS) \ - $(NO_INDIRECT_LDFLAGS) \ - $(NO_UNDEFINED_LDFLAGS) \ - $(NULL) - -libvirtd_LDADD =3D \ - $(LIBXML_LIBS) \ - $(GNUTLS_LIBS) \ - $(SASL_LIBS) \ - $(DBUS_LIBS) \ - $(LIBNL_LIBS) - -if WITH_DTRACE_PROBES -libvirtd_LDADD +=3D ../src/libvirt_probes.lo -endif WITH_DTRACE_PROBES - -libvirtd_LDADD +=3D \ - libvirtd_conf.la \ - ../src/libvirt_driver_admin.la \ - ../src/libvirt-lxc.la \ - ../src/libvirt-qemu.la \ - $(NULL) - -libvirtd_LDADD +=3D ../src/libvirt.la - if WITH_POLKIT if WITH_POLKIT0 policydir =3D $(datadir)/PolicyKit/policy @@ -239,9 +124,6 @@ install-data-polkit:: uninstall-data-polkit:: endif ! WITH_POLKIT =20 -remote.c: $(DAEMON_GENERATED) -remote.h: $(DAEMON_GENERATED) - LOGROTATE_CONFS =3D libvirtd.qemu.logrotate libvirtd.lxc.logrotate \ libvirtd.libxl.logrotate libvirtd.uml.logrotate \ libvirtd.logrotate @@ -414,11 +296,6 @@ check-augeas: test_libvirtd.aug '$(AUGPARSE)' -I $(srcdir) test_libvirtd.aug; \ fi =20 - -# This must be added last, since functions it provides/replaces -# are used by nearly every other library. -libvirtd_LDADD +=3D ../gnulib/lib/libgnu.la $(LIBSOCKET) - else ! WITH_LIBVIRTD install-data-local: install-data-sasl uninstall-local:: uninstall-data-sasl @@ -462,4 +339,4 @@ endif ! WITH_SASL =20 CLEANFILES +=3D $(BUILT_SOURCES) $(man8_MANS) CLEANFILES +=3D *.cov *.gcov .libs/*.gcda .libs/*.gcno *.gcno *.gcda -MAINTAINERCLEANFILES =3D $(MANINFILES) $(DAEMON_GENERATED) +MAINTAINERCLEANFILES =3D $(MANINFILES) diff --git a/src/Makefile.am b/src/Makefile.am index bb51be50d7..a1e5fa573e 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -85,6 +85,7 @@ lib_LTLIBRARIES =3D libvirt.la libvirt-qemu.la libvirt-lx= c.la =20 moddir =3D $(libdir)/libvirt/connection-driver mod_LTLIBRARIES =3D +sbin_PROGRAMS =3D =20 confdir =3D $(sysconfdir)/libvirt conf_DATA =3D libvirt.conf libvirt-admin.conf @@ -537,12 +538,45 @@ remote/qemu_client_bodies.h: $(srcdir)/rpc/gendispatc= h.pl \ qemu QEMU $(QEMU_PROTOCOL) \ > $(srcdir)/remote/qemu_client_bodies.h =20 +remote/remote_daemon_dispatch_stubs.h: $(top_srcdir)/src/rpc/gendispatch.p= l \ + $(REMOTE_PROTOCOL) Makefile.am + $(AM_V_GEN)$(PERL) -w $(top_srcdir)/src/rpc/gendispatch.pl \ + --mode=3Dserver remote REMOTE $(REMOTE_PROTOCOL) \ + > $(srcdir)/remote/remote_daemon_dispatch_stubs.h + +remote/remote_daemon_dispatch_lxc_stubs.h: $(top_srcdir)/src/rpc/gendispat= ch.pl \ + $(LXC_PROTOCOL) Makefile.am + $(AM_V_GEN)$(PERL) -w $(top_srcdir)/src/rpc/gendispatch.pl \ + --mode=3Dserver lxc LXC $(LXC_PROTOCOL) \ + > $(srcdir)/remote/remote_daemon_dispatch_lxc_stubs.h + +remote/remote_daemon_dispatch_qemu_stubs.h: $(top_srcdir)/src/rpc/gendispa= tch.pl \ + $(QEMU_PROTOCOL) Makefile.am + $(AM_V_GEN)$(PERL) -w $(top_srcdir)/src/rpc/gendispatch.pl \ + --mode=3Dserver qemu QEMU $(QEMU_PROTOCOL) \ + > $(srcdir)/remote/remote_daemon_dispatch_qemu_stubs.h + REMOTE_DRIVER_SOURCES =3D \ remote/remote_driver.c remote/remote_driver.h \ $(REMOTE_DRIVER_GENERATED) =20 +LIBVIRTD_GENERATED =3D \ + remote/remote_daemon_dispatch_stubs.h \ + remote/remote_daemon_dispatch_lxc_stubs.h \ + remote/remote_daemon_dispatch_qemu_stubs.h \ + $(NULL) + +LIBVIRTD_SOURCES =3D \ + remote/remote_daemon.c remote/remote_daemon.h \ + remote/remote_daemon_config.c remote/remote_daemon_config.h \ + remote/remote_daemon_dispatch.c remote/remote_daemon_dispatch.h \ + remote/remote_daemon_stream.c remote/remote_daemon_stream.h \ + $(LIBVIRTD_GENERATED) + EXTRA_DIST +=3D $(REMOTE_DRIVER_PROTOCOL) \ - $(REMOTE_DRIVER_GENERATED) + $(REMOTE_DRIVER_GENERATED) \ + $(LIBVIRTD_SOURCES) \ + $(NULL) =20 ADMIN_PROTOCOL =3D $(srcdir)/admin/admin_protocol.x =20 @@ -1329,6 +1363,55 @@ BUILT_SOURCES +=3D $(REMOTE_DRIVER_GENERATED) =20 endif WITH_REMOTE =20 + +if WITH_LIBVIRTD + +sbin_PROGRAMS +=3D libvirtd + +BUILT_SOURCES +=3D $(LIBVIRTD_GENERATED) + +libvirtd_SOURCES =3D $(LIBVIRTD_SOURCES) + +libvirtd_CFLAGS =3D \ + $(LIBXML_CFLAGS) $(GNUTLS_CFLAGS) $(SASL_CFLAGS) \ + $(XDR_CFLAGS) $(DBUS_CFLAGS) $(LIBNL_CFLAGS) \ + $(WARN_CFLAGS) $(PIE_CFLAGS) \ + $(COVERAGE_CFLAGS) \ + -I$(srcdir)/access \ + -I$(srcdir)/conf \ + -I$(srcdir)/rpc \ + $(NULL) + +libvirtd_LDFLAGS =3D \ + $(RELRO_LDFLAGS) \ + $(PIE_LDFLAGS) \ + $(COVERAGE_LDFLAGS) \ + $(NO_INDIRECT_LDFLAGS) \ + $(NO_UNDEFINED_LDFLAGS) \ + $(NULL) + +libvirtd_LDADD =3D \ + $(LIBXML_LIBS) \ + $(GNUTLS_LIBS) \ + $(SASL_LIBS) \ + $(DBUS_LIBS) \ + $(LIBNL_LIBS) \ + $(NULL) + +if WITH_DTRACE_PROBES +libvirtd_LDADD +=3D ../src/libvirt_probes.lo +endif WITH_DTRACE_PROBES + +libvirtd_LDADD +=3D \ + libvirt_driver_admin.la \ + libvirt-lxc.la \ + libvirt-qemu.la \ + libvirt.la \ + ../gnulib/lib/libgnu.la $(LIBSOCKET) \ + $(NULL) + +endif WITH_LIBVIRTD + %protocol.c: %protocol.x %protocol.h $(srcdir)/rpc/genprotocol.pl $(AM_V_GEN)$(PERL) -w $(srcdir)/rpc/genprotocol.pl $(RPCGEN) -c \ $< $(srcdir)/$(subst $(srcdir)/,,$@) @@ -2620,7 +2703,7 @@ locking/%-lockd.conf: $(srcdir)/locking/lockd.conf cp $< $@ =20 =20 -sbin_PROGRAMS =3D virtlockd virtlogd +sbin_PROGRAMS +=3D virtlockd virtlogd =20 virtlockd_SOURCES =3D \ $(LOCK_DAEMON_SOURCES) \ @@ -3368,4 +3451,8 @@ endif WITH_NETWORK =20 CLEANFILES +=3D *.gcov .libs/*.gcda .libs/*.gcno *.gcno *.gcda *.i *.s DISTCLEANFILES +=3D $(GENERATED_SYM_FILES) -MAINTAINERCLEANFILES +=3D $(REMOTE_DRIVER_GENERATED) $(VIR_NET_RPC_GENERAT= ED) +MAINTAINERCLEANFILES +=3D \ + $(REMOTE_DRIVER_GENERATED) \ + $(LIBVIRTD_GENERATED) \ + $(VIR_NET_RPC_GENERATED) \ + $(NULL) diff --git a/daemon/libvirtd.c b/src/remote/remote_daemon.c similarity index 99% rename from daemon/libvirtd.c rename to src/remote/remote_daemon.c index c5bb12b8ce..a452c72b59 100644 --- a/daemon/libvirtd.c +++ b/src/remote/remote_daemon.c @@ -1,7 +1,7 @@ /* - * libvirtd.c: daemon start of day, guest process & i/o management + * remote_daemon.c: daemon start of day, guest process & i/o management * - * Copyright (C) 2006-2015 Red Hat, Inc. + * Copyright (C) 2006-2018 Red Hat, Inc. * Copyright (C) 2006 Daniel P. Berrange * * This library is free software; you can redistribute it and/or @@ -40,8 +40,8 @@ =20 #define VIR_FROM_THIS VIR_FROM_QEMU =20 -#include "libvirtd.h" -#include "libvirtd-config.h" +#include "remote_daemon.h" +#include "remote_daemon_config.h" =20 #include "admin/admin_server_dispatch.h" #include "viruuid.h" @@ -50,7 +50,7 @@ #include "virconf.h" #include "virnetlink.h" #include "virnetdaemon.h" -#include "remote.h" +#include "remote_daemon_dispatch.h" #include "virhook.h" #include "viraudit.h" #include "virstring.h" diff --git a/daemon/libvirtd.h b/src/remote/remote_daemon.h similarity index 93% rename from daemon/libvirtd.h rename to src/remote/remote_daemon.h index 082c4bc4df..4467f71da9 100644 --- a/daemon/libvirtd.h +++ b/src/remote/remote_daemon.h @@ -1,7 +1,7 @@ /* - * libvirtd.h: daemon data structure definitions + * remote_daemon.h: daemon data structure definitions * - * Copyright (C) 2006-2015 Red Hat, Inc. + * Copyright (C) 2006-2018 Red Hat, Inc. * Copyright (C) 2006 Daniel P. Berrange * * This library is free software; you can redistribute it and/or @@ -22,8 +22,8 @@ */ =20 =20 -#ifndef LIBVIRTD_H__ -# define LIBVIRTD_H__ +#ifndef __REMOTE_DAEMON_H__ +# define __REMOTE_DAEMON_H__ =20 # define VIR_ENUM_SENTINELS =20 @@ -85,4 +85,4 @@ extern virNetSASLContextPtr saslCtxt; extern virNetServerProgramPtr remoteProgram; extern virNetServerProgramPtr qemuProgram; =20 -#endif +#endif /* __REMOTE_DAEMON_H__ */ diff --git a/daemon/libvirtd-config.c b/src/remote/remote_daemon_config.c similarity index 98% rename from daemon/libvirtd-config.c rename to src/remote/remote_daemon_config.c index 19b3d168ea..2317115b82 100644 --- a/daemon/libvirtd-config.c +++ b/src/remote/remote_daemon_config.c @@ -1,7 +1,7 @@ /* - * libvirtd-config.c: daemon start of day, guest process & i/o management + * remote_daemon_config.h: libvirtd config file handling * - * Copyright (C) 2006-2012, 2014, 2015 Red Hat, Inc. + * Copyright (C) 2006-2018 Red Hat, Inc. * Copyright (C) 2006 Daniel P. Berrange * * This library is free software; you can redistribute it and/or @@ -23,15 +23,15 @@ =20 #include =20 -#include "libvirtd-config.h" +#include "remote_daemon_config.h" #include "virconf.h" #include "viralloc.h" #include "virerror.h" #include "virlog.h" #include "rpc/virnetserver.h" #include "configmake.h" -#include "remote/remote_protocol.h" -#include "remote/remote_driver.h" +#include "remote_protocol.h" +#include "remote_driver.h" #include "util/virnetdevopenvswitch.h" #include "virstring.h" #include "virutil.h" diff --git a/daemon/libvirtd-config.h b/src/remote/remote_daemon_config.h similarity index 92% rename from daemon/libvirtd-config.h rename to src/remote/remote_daemon_config.h index d618c96608..49ea80104b 100644 --- a/daemon/libvirtd-config.h +++ b/src/remote/remote_daemon_config.h @@ -1,7 +1,7 @@ /* - * libvirtd-config.h: daemon start of day, guest process & i/o management + * remote_daemon_config.h: libvirtd config file handling * - * Copyright (C) 2006-2012, 2015 Red Hat, Inc. + * Copyright (C) 2006-2018 Red Hat, Inc. * Copyright (C) 2006 Daniel P. Berrange * * This library is free software; you can redistribute it and/or @@ -21,8 +21,8 @@ * Author: Daniel P. Berrange */ =20 -#ifndef __LIBVIRTD_CONFIG_H__ -# define __LIBVIRTD_CONFIG_H__ +#ifndef __REMOTE_DAEMON_CONFIG_H__ +# define __REMOTE_DAEMON_CONFIG_H__ =20 # include "internal.h" =20 @@ -106,4 +106,4 @@ int daemonConfigLoadData(struct daemonConfig *data, const char *filename, const char *filedata); =20 -#endif /* __LIBVIRTD_CONFIG_H__ */ +#endif /* __REMOTE_DAEMON_CONFIG_H__ */ diff --git a/daemon/remote.c b/src/remote/remote_daemon_dispatch.c similarity index 99% rename from daemon/remote.c rename to src/remote/remote_daemon_dispatch.c index 6de4bd00d4..fdb0a362e4 100644 --- a/daemon/remote.c +++ b/src/remote/remote_daemon_dispatch.c @@ -1,7 +1,7 @@ /* - * remote.c: handlers for RPC method calls + * remote_daemon_dispatch.c: handlers for RPC method calls * - * Copyright (C) 2007-2015 Red Hat, Inc. + * Copyright (C) 2007-2018 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 @@ -24,13 +24,13 @@ =20 #include "virerror.h" =20 -#include "remote.h" -#include "libvirtd.h" +#include "remote_daemon_dispatch.h" +#include "remote_daemon.h" #include "libvirt_internal.h" #include "datatypes.h" #include "viralloc.h" #include "virlog.h" -#include "stream.h" +#include "remote_daemon_stream.h" #include "viruuid.h" #include "vircommand.h" #include "intprops.h" @@ -108,9 +108,9 @@ remoteSerializeDomainDiskErrors(virDomainDiskErrorPtr e= rrors, remote_domain_disk_error **ret_errors_val, u_int *ret_errors_len); =20 -#include "remote_dispatch.h" -#include "qemu_dispatch.h" -#include "lxc_dispatch.h" +#include "remote_daemon_dispatch_stubs.h" +#include "remote_daemon_dispatch_qemu_stubs.h" +#include "remote_daemon_dispatch_lxc_stubs.h" =20 =20 /* Prototypes */ diff --git a/daemon/remote.h b/src/remote/remote_daemon_dispatch.h similarity index 85% rename from daemon/remote.h rename to src/remote/remote_daemon_dispatch.h index c1bce9ba2e..015ab977fc 100644 --- a/daemon/remote.h +++ b/src/remote/remote_daemon_dispatch.h @@ -1,7 +1,7 @@ /* - * remote.h: handlers for RPC method calls + * remote_daemon_dispatch.h: handlers for RPC method calls * - * Copyright (C) 2007, 2008, 2009 Red Hat, Inc. + * Copyright (C) 2007-2018 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 @@ -21,8 +21,8 @@ * Author: Daniel P. Berrange */ =20 -#ifndef __LIBVIRTD_REMOTE_H__ -# define __LIBVIRTD_REMOTE_H__ +#ifndef __REMOTE_DAEMON_DISPATCH_H__ +# define __REMOTE_DAEMON_DISPATCH_H__ =20 # include "remote_protocol.h" # include "rpc/virnetserverprogram.h" @@ -42,4 +42,4 @@ void remoteClientFree(void *data); void *remoteClientNew(virNetServerClientPtr client, void *opaque); =20 -#endif /* __LIBVIRTD_REMOTE_H__ */ +#endif /* __REMOTE_DAEMON_DISPATCH_H__ */ diff --git a/daemon/stream.c b/src/remote/remote_daemon_stream.c similarity index 99% rename from daemon/stream.c rename to src/remote/remote_daemon_stream.c index 49682f1145..4dd3af9e0d 100644 --- a/daemon/stream.c +++ b/src/remote/remote_daemon_stream.c @@ -1,7 +1,7 @@ /* - * stream.c: APIs for managing client streams + * remote_daemon_stream.c: APIs for managing client streams * - * Copyright (C) 2009-2014 Red Hat, Inc. + * Copyright (C) 2009-2018 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 @@ -23,8 +23,8 @@ =20 #include =20 -#include "stream.h" -#include "remote.h" +#include "remote_daemon_stream.h" +#include "remote_daemon_dispatch.h" #include "viralloc.h" #include "virlog.h" #include "virnetserverclient.h" diff --git a/daemon/stream.h b/src/remote/remote_daemon_stream.h similarity index 85% rename from daemon/stream.h rename to src/remote/remote_daemon_stream.h index e1f1067595..832e1f7547 100644 --- a/daemon/stream.h +++ b/src/remote/remote_daemon_stream.h @@ -1,7 +1,7 @@ /* - * stream.h: APIs for managing client streams + * remote_daemon_stream.h: APIs for managing client streams * - * Copyright (C) 2009 Red Hat, Inc. + * Copyright (C) 2009-2018 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 @@ -21,10 +21,10 @@ */ =20 =20 -#ifndef __LIBVIRTD_STREAM_H__ -# define __LIBVIRTD_STREAM_H__ +#ifndef __REMOTE_DAEMON_STREAM_H__ +# define __REMOTE_DAEMON_STREAM_H__ =20 -# include "libvirtd.h" +# include "remote_daemon.h" =20 daemonClientStream * daemonCreateClientStream(virNetServerClientPtr client, @@ -47,4 +47,4 @@ daemonRemoveClientStream(virNetServerClientPtr client, void daemonRemoveAllClientStreams(daemonClientStream *stream); =20 -#endif /* __LIBVIRTD_STREAM_H__ */ +#endif /* __REMOTE_DAEMON_STREAM_H__ */ --=20 2.14.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list