[libvirt] [PATCH v2 6/9] admin: Move admin_server.{h, c} to admin.{h, c}

Martin Kletzander mkletzan at redhat.com
Thu Sep 3 09:17:58 UTC 2015


On Fri, Aug 21, 2015 at 08:04:07PM +0200, Erik Skultety wrote:
>This change is merely because admin_server would contain all the code
>from dispatchers and helpers to the actual APIs. Admin should have
>similar structure to the daemon-side remote driver - dispatchers and
>helpers in a separate module, APIs in a separate module.
>
>Best viewed with -M.
>---
> daemon/Makefile.am                 | 6 ++++--
> daemon/{admin_server.c => admin.c} | 4 ++--
> daemon/{admin_server.h => admin.h} | 4 ++--
> daemon/libvirtd.c                  | 4 ++--
> po/POTFILES.in                     | 2 +-
> 5 files changed, 11 insertions(+), 9 deletions(-)
> rename daemon/{admin_server.c => admin.c} (97%)
> rename daemon/{admin_server.h => admin.h} (92%)
>
>diff --git a/daemon/Makefile.am b/daemon/Makefile.am
>index be1b5a9..5b13960 100644
>--- a/daemon/Makefile.am
>+++ b/daemon/Makefile.am
>@@ -42,6 +42,7 @@ DAEMON_SOURCES =					\
> 		libvirtd.c libvirtd.h			\
> 		remote.c remote.h			\
> 		stream.c stream.h			\
>+		admin.c admin.h				\
> 		$(DAEMON_GENERATED)
>
> LIBVIRTD_CONF_SOURCES = libvirtd-config.c libvirtd-config.h
>@@ -128,7 +129,7 @@ libvirtd_conf_la_LIBADD = $(LIBXML_LIBS)
>
> noinst_LTLIBRARIES += libvirtd_admin.la
> libvirtd_admin_la_SOURCES = \
>-		admin_server.c admin_server.h
>+		admin.c admin.h
>
> libvirtd_admin_la_CFLAGS = \
> 		$(AM_CFLAGS)		\
>@@ -319,7 +320,8 @@ endif ! WITH_POLKIT
>
> remote.c: $(DAEMON_GENERATED)
> remote.h: $(DAEMON_GENERATED)
>-admin_server.c: $(DAEMON_GENERATED)
>+admin.c: $(DAEMON_GENERATED)
>+admin.h: $(DAEMON_GENERATED)
>
> LOGROTATE_CONFS = libvirtd.qemu.logrotate libvirtd.lxc.logrotate \
> 		  libvirtd.libxl.logrotate libvirtd.uml.logrotate \
>diff --git a/daemon/admin_server.c b/daemon/admin.c
>similarity index 97%
>rename from daemon/admin_server.c
>rename to daemon/admin.c
>index 712a44b..53144ee 100644
>--- a/daemon/admin_server.c
>+++ b/daemon/admin.c
>@@ -1,5 +1,5 @@
> /*
>- * admin_server.c:
>+ * admin.c: handlers for admin RPC method calls
>  *
>  * Copyright (C) 2014-2015 Red Hat, Inc.
>  *
>@@ -27,7 +27,7 @@
> #include "libvirt_internal.h"
>
> #include "admin_protocol.h"
>-#include "admin_server.h"
>+#include "admin.h"
> #include "datatypes.h"
> #include "viralloc.h"
> #include "virerror.h"
>diff --git a/daemon/admin_server.h b/daemon/admin.h
>similarity index 92%
>rename from daemon/admin_server.h
>rename to daemon/admin.h
>index 26721a6..1e6802a 100644
>--- a/daemon/admin_server.h
>+++ b/daemon/admin.h
>@@ -1,7 +1,7 @@
> /*
>- * admin_server.h
>+ * admin.h: handlers for admin RPC method calls
>  *
>- * Copyright (C) 2014 Red Hat, Inc.
>+ * Copyright (C) 2015 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
>diff --git a/daemon/libvirtd.c b/daemon/libvirtd.c
>index 5920a96..4966243 100644
>--- a/daemon/libvirtd.c
>+++ b/daemon/libvirtd.c
>@@ -44,7 +44,7 @@
> #include "libvirtd.h"
> #include "libvirtd-config.h"
>
>-#include "admin_server.h"
>+#include "admin.h"
> #include "viruuid.h"
> #include "remote_driver.h"
> #include "viralloc.h"
>@@ -523,7 +523,7 @@ daemonSetupNetworking(virNetServerPtr srv,
>         goto cleanup;
>
>     /* Temporarily disabled */
>-    if (sock_path_adm && false) {
>+    if (sock_path_adm) {

This got here by accident, I guess.  We will only enable it after
enough support is in for the next release to come out and we will
enable it together with distributing header files etc.

>         VIR_DEBUG("Registering unix socket %s", sock_path_adm);
>         if (!(svcAdm = virNetServerServiceNewUNIX(sock_path_adm,
>                                                   unix_sock_adm_mask,
>diff --git a/po/POTFILES.in b/po/POTFILES.in
>index 1e52e6a..cef10cb 100644
>--- a/po/POTFILES.in
>+++ b/po/POTFILES.in
>@@ -1,4 +1,4 @@
>-daemon/admin_server.c
>+daemon/admin.c
> daemon/libvirtd-config.c
> daemon/libvirtd.c
> daemon/qemu_dispatch.h
>--
>2.4.3
>
>--
>libvir-list mailing list
>libvir-list at redhat.com
>https://www.redhat.com/mailman/listinfo/libvir-list
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20150903/abbbb419/attachment-0001.sig>


More information about the libvir-list mailing list