From nobody Wed May 14 01:43:31 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; dkim=fail; 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 1527057350659907.986627443255; Tue, 22 May 2018 23:35:50 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.25]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4E8B830BD443; Wed, 23 May 2018 06: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 1AD892010D5A; Wed, 23 May 2018 06: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 C3B3C4CA82; Wed, 23 May 2018 06:35:48 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w4N6ZlYT017158 for ; Wed, 23 May 2018 02:35:47 -0400 Received: by smtp.corp.redhat.com (Postfix) id 08AA291EB7; Wed, 23 May 2018 06:35:47 +0000 (UTC) Received: from mx1.redhat.com (ext-mx19.extmail.prod.ext.phx2.redhat.com [10.5.110.48]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0114391EAD; Wed, 23 May 2018 06:35:44 +0000 (UTC) Received: from mail-pf0-f193.google.com (mail-pf0-f193.google.com [209.85.192.193]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8ACE430B5A17; Wed, 23 May 2018 06:35:33 +0000 (UTC) Received: by mail-pf0-f193.google.com with SMTP id w129-v6so9976098pfd.3; Tue, 22 May 2018 23:35:33 -0700 (PDT) Received: from localhost.localdomain ([45.122.156.254]) by smtp.gmail.com with ESMTPSA id g64-v6sm34500852pfd.50.2018.05.22.23.35.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 22 May 2018 23:35:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=HxDxdaGCDASCB2hLRaDJH5dnUrOBr3qaY6GUPn/j8NA=; b=sz0cRUNRG2NOPgliLFU74Os5/cUqyi9T77e8DlBLLybJv1BQMGvlsXXCKrU8wH5r56 +yRehtSXMi/vaolyfTcg/pg+PgIa9Nclo4vfcHPY1P5ATkVhNx+wSGkBKyZQVY9mJmsW yQvtBVWzSz8XS9T6TJ1yBTKfV2RMPaoNHjgu6ik0Uj2/WPWMjDPONSbv2i59Z2C1FPNI dJWrQLshtAG8bxG8zTxu7CyCqVGqGnE+GM5HgwH+a3no5nebKzkC4wu1IS8/GFyU7HM4 HNBsZmyLZWmr6qmFZZm4VaHRzrxdts7tH0QOZgZIVR9eCB0ao/XohUBg/oBqoXb2pzyi BirQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=HxDxdaGCDASCB2hLRaDJH5dnUrOBr3qaY6GUPn/j8NA=; b=m2FWtg0u+WtzvB25qyWPhRu1JWJUJ6iPNTcloSIGS0VpyliYLkrglkxH9DLDiwrDoe Czq89U7zMn9iiStOOUoQYgeUfA55e60vFy/ppWRBIvQo8C2t92h4dmMKjh59gLlq3Py+ y8yqG5N3xQe2/B8/i93haZvNnQQdAzNePJtzn9nXXthWLX9ct2VgsGqUlV0HtIv4KQyY IWjrRA7HMIJFagDeR5RNEfD4BL+blKl5n0T8ilyQEHP89zlsv9D+0CXQyhj+cjMU5Rap RIoA+fKF5WsYali7pSgn6O7v+I+WWDSekIo0Hey96I9JN0uHyGmSFEfTRtTlffzpkLt/ k6/Q== X-Gm-Message-State: ALKqPweiN97w1xSGJyGMn3I5hw6b0qhLR4GvFvA77pKH3eeERo5S7p8P h9jQGnO10dHKnPwblSJj3nvPbA== X-Google-Smtp-Source: AB8JxZpVxQqhqDJqLTtO9+vy6sd+c2PLtBiWS58kQC4ZEtmH5KGNwiZBwOy+pddCFEPGEcncduFgzw== X-Received: by 2002:aa7:850f:: with SMTP id v15-v6mr1621278pfn.144.1527057332766; Tue, 22 May 2018 23:35:32 -0700 (PDT) From: Lin Ma To: libvir-list@redhat.com Date: Wed, 23 May 2018 14:32:41 +0800 Message-Id: <20180523063246.3742-4-lma@suse.com> In-Reply-To: <20180523063246.3742-1-lma@suse.com> References: <20180523063246.3742-1-lma@suse.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.48]); Wed, 23 May 2018 06:35:33 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.48]); Wed, 23 May 2018 06:35:33 +0000 (UTC) for IP:'209.85.192.193' DOMAIN:'mail-pf0-f193.google.com' HELO:'mail-pf0-f193.google.com' FROM:'morecache@gmail.com' RCPT:'' X-RedHat-Spam-Score: -1.199 (DKIM_SIGNED, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_PASS, T_DKIM_INVALID) 209.85.192.193 mail-pf0-f193.google.com 209.85.192.193 mail-pf0-f193.google.com X-Scanned-By: MIMEDefang 2.84 on 10.5.110.48 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.27 X-loop: libvir-list@redhat.com Cc: mprivozn@redhat.com, Lin Ma Subject: [libvirt] [ [PATCH v3 3/8] virsh: Move vshEventCallback structure definition to virsh-domain.h 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.84 on 10.5.11.25 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Wed, 23 May 2018 06:35:49 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" The next patch will use it in virsh-completer.c for returning the strings of domain event name. Signed-off-by: Lin Ma --- tools/virsh-domain.c | 8 +------- tools/virsh-domain.h | 8 ++++++++ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index cfbbf5a7bc..347c744bc9 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -12832,12 +12832,6 @@ virshDomainEventTrayChangeToString(int reason) return str ? _(str) : _("unknown"); } =20 -struct vshEventCallback { - const char *name; - virConnectDomainEventGenericCallback cb; -}; -typedef struct vshEventCallback vshEventCallback; - struct virshDomEventData { vshControl *ctl; bool loop; @@ -13278,7 +13272,7 @@ virshEventBlockThresholdPrint(virConnectPtr conn AT= TRIBUTE_UNUSED, } =20 =20 -static vshEventCallback vshEventCallbacks[] =3D { +vshEventCallback vshEventCallbacks[] =3D { { "lifecycle", VIR_DOMAIN_EVENT_CALLBACK(virshEventLifecyclePrint), }, { "reboot", virshEventGenericPrint, }, diff --git a/tools/virsh-domain.h b/tools/virsh-domain.h index 3f9d12a5ff..e8e5611244 100644 --- a/tools/virsh-domain.h +++ b/tools/virsh-domain.h @@ -28,6 +28,14 @@ =20 # include "virsh.h" =20 +struct vshEventCallback { + const char *name; + virConnectDomainEventGenericCallback cb; +}; +typedef struct vshEventCallback vshEventCallback; + +extern vshEventCallback vshEventCallbacks[]; + extern const vshCmdDef domManagementCmds[]; =20 #endif /* VIRSH_DOMAIN_H */ --=20 2.16.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list