From nobody Fri May 16 00:21:15 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 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1500903590141741.8486607589157; Mon, 24 Jul 2017 06:39:50 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8B43AA0B81; Mon, 24 Jul 2017 13:39:45 +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 5E1C9871ED; Mon, 24 Jul 2017 13:39:45 +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 071AD14B25; Mon, 24 Jul 2017 13:39:45 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v6ODdCQB001789 for ; Mon, 24 Jul 2017 09:39:12 -0400 Received: by smtp.corp.redhat.com (Postfix) id C124D6931F; Mon, 24 Jul 2017 13:39:12 +0000 (UTC) Received: from antique-work.brq.redhat.com (unknown [10.43.2.41]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4143669329 for ; Mon, 24 Jul 2017 13:39:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 8B43AA0B81 Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=libvir-list-bounces@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 8B43AA0B81 From: Pavel Hrdina To: libvir-list@redhat.com Date: Mon, 24 Jul 2017 15:38:59 +0200 Message-Id: In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Subject: [libvirt] [dbus PATCH 6/9] main: rename functions to follow libvirt naming rules 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: , MIME-Version: 1.0 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.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Mon, 24 Jul 2017 13:39:46 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Pavel Hrdina --- src/main.c | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/src/main.c b/src/main.c index a1d9cd1..493edcb 100644 --- a/src/main.c +++ b/src/main.c @@ -14,7 +14,7 @@ static int loop_status; =20 static int -bus_get_libvirt_events(sd_bus *bus) +virtDBusGetLibvirtEvents(sd_bus *bus) { int events; int virt_events =3D 0; @@ -31,7 +31,7 @@ bus_get_libvirt_events(sd_bus *bus) } =20 static int -bus_process_events(sd_bus *bus) +virtDBusProcessEvents(sd_bus *bus) { for (;;) { int r; @@ -48,35 +48,35 @@ bus_process_events(sd_bus *bus) } =20 static void -virEventRemoveHandlep(int *watchp) +virtDBusVirEventRemoveHandlep(int *watchp) { if (*watchp >=3D 0) virEventRemoveHandle(*watchp); } =20 static void -handle_signal(int watch, - int fd, - int events, - void *opaque) +virtDBusHandleSignal(int watch, + int fd, + int events, + void *opaque) { loop_status =3D -ECANCELED; } =20 static void -handle_bus_event(int watch, - int fd, - int events, - void *opaque) +virtDBusHandleBusEvent(int watch, + int fd, + int events, + void *opaque) { sd_bus *bus =3D opaque; =20 - loop_status =3D bus_process_events(bus); + loop_status =3D virtDBusProcessEvents(bus); =20 if (loop_status < 0) return; =20 - virEventUpdateHandle(watch, bus_get_libvirt_events(bus)); + virEventUpdateHandle(watch, virtDBusGetLibvirtEvents(bus)); } =20 int @@ -101,8 +101,8 @@ main(int argc, char *argv[]) _cleanup_(virt_manager_freep) VirtManager *manager =3D NULL; _cleanup_(sd_bus_unrefp) sd_bus *bus =3D NULL; _cleanup_(virtDBusClosep) int signal_fd =3D -1; - _cleanup_(virEventRemoveHandlep) int bus_watch =3D -1; - _cleanup_(virEventRemoveHandlep) int signal_watch =3D -1; + _cleanup_(virtDBusVirEventRemoveHandlep) int bus_watch =3D -1; + _cleanup_(virtDBusVirEventRemoveHandlep) int signal_watch =3D -1; sigset_t mask; int c; int r; @@ -168,20 +168,20 @@ main(int argc, char *argv[]) return EXIT_FAILURE; } =20 - r =3D bus_process_events(bus); + r =3D virtDBusProcessEvents(bus); if (r < 0) return EXIT_FAILURE; =20 bus_watch =3D virEventAddHandle(sd_bus_get_fd(bus), - bus_get_libvirt_events(bus), - handle_bus_event, + virtDBusGetLibvirtEvents(bus), + virtDBusHandleBusEvent, bus, NULL); =20 signal_fd =3D signalfd(-1, &mask, SFD_NONBLOCK | SFD_CLOEXEC); signal_watch =3D virEventAddHandle(signal_fd, VIR_EVENT_HANDLE_READABLE, - handle_signal, + virtDBusHandleSignal, NULL, NULL); =20 --=20 2.13.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list