From nobody Mon Feb 9 08:57:24 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1560511732; cv=none; d=zoho.com; s=zohoarc; b=TEYH77pVUNtu96aFjoOyJBhGv8vDeP5ruSlWp/AcGLlzJhALL1ZcXBgIl/uj2EdtPowbeWqHTRtxVrUen28XK/mtMwvTwHzOLKYrx+GY7nWPid1/5JH5Wmt65LEw+3rt3sZuYBpBb7KEHb+vmRK8Iueco8qlN10CtlDkHV2GxRQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1560511732; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=eHSThRj+kBnp7/rLH4h6KeovlBJrknNZuNGSgmMpwSo=; b=V3GoykJi+iYj5CFjBmQqZN2czN2N0sw6A4OjEF0lto319qGINrAzIdyXRkkkrxi5ThzchByvcS45gmVLpLbNhoNynlWhlLrNToxN/NhukNjNraSJHpb+MyxcbowoCdgOqoSCiiQA5m2kgddc78HA1ql+gXr03I1mQJ3ABTGO/G8= ARC-Authentication-Results: i=1; mx.zoho.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1560511732519882.0814711858608; Fri, 14 Jun 2019 04:28:52 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hbkN8-0008Sq-C9; Fri, 14 Jun 2019 11:27:54 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hbkN7-0008SE-Om for xen-devel@lists.xenproject.org; Fri, 14 Jun 2019 11:27:53 +0000 Received: from esa3.hc3370-68.iphmx.com (unknown [216.71.145.155]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTPS id 725a4d25-8e97-11e9-8980-bc764e045a96; Fri, 14 Jun 2019 11:27:52 +0000 (UTC) X-Inumbo-ID: 725a4d25-8e97-11e9-8980-bc764e045a96 Authentication-Results: esa3.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=anthony.perard@citrix.com; spf=Pass smtp.mailfrom=anthony.perard@citrix.com; spf=None smtp.helo=postmaster@mail.citrix.com Received-SPF: none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Received-SPF: None (esa3.hc3370-68.iphmx.com: no sender authenticity information available from domain of anthony.perard@citrix.com) identity=pra; client-ip=162.221.158.21; receiver=esa3.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="anthony.perard@citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa3.hc3370-68.iphmx.com: domain of anthony.perard@citrix.com designates 162.221.158.21 as permitted sender) identity=mailfrom; client-ip=162.221.158.21; receiver=esa3.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="anthony.perard@citrix.com"; x-conformance=sidf_compatible; x-record-type="v=spf1"; x-record-text="v=spf1 ip4:209.167.231.154 ip4:178.63.86.133 ip4:195.66.111.40/30 ip4:85.115.9.32/28 ip4:199.102.83.4 ip4:192.28.146.160 ip4:192.28.146.107 ip4:216.52.6.88 ip4:216.52.6.188 ip4:162.221.158.21 ip4:162.221.156.83 ~all" Received-SPF: None (esa3.hc3370-68.iphmx.com: no sender authenticity information available from domain of postmaster@mail.citrix.com) identity=helo; client-ip=162.221.158.21; receiver=esa3.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="postmaster@mail.citrix.com"; x-conformance=sidf_compatible IronPort-SDR: XuuLk7rHiFx7QLhIv3kuzFGBBp5YdE7XbRau8sdAMtgRITnvU1ocX1S5Qxu19O9aFrBAd0vptl yCg9Fx5F1PBOv0zkHO9di/9fWNAPCRETwuWFKJBH7Y9gtbIMK4J/BbX9ZMuOj6zxfqsDULvysb K2ZRUT2z3Ibv13Jk43Z9iVbin7LWxTD8nVKyuowCMXwxfHn04KuKT9+6KHLUbmqsD03LmkX5hT TBMiNDG4gTKKIpeqqMS9sUYU/3l56XRpXoUKGANFreZSl81fn7p2oytlPcE1xj88w/7+4iFXUU n3A= X-SBRS: 2.7 X-MesageID: 1746072 X-Ironport-Server: esa3.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.63,373,1557201600"; d="scan'208";a="1746072" From: Anthony PERARD To: Date: Fri, 14 Jun 2019 12:24:42 +0100 Message-ID: <20190614112444.29980-14-anthony.perard@citrix.com> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190614112444.29980-1-anthony.perard@citrix.com> References: <20190614112444.29980-1-anthony.perard@citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [PATCH 13/15] libxl: Constify libxl_device_* param of *_getinfo X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Anthony PERARD , Ian Jackson , Wei Liu Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" The libxl_device_TYPE parameter of all the libxl_device_TYPE_getinfo function seems to be only used as input to find more information to bi stored in the libxl_TYPEinfo parameter. Make sure this is always true and constify the input parameter to avoid further mistake. Signed-off-by: Anthony PERARD Acked-by: Ian Jackson --- tools/libxl/libxl.h | 14 +++++++------- tools/libxl/libxl_console.c | 2 +- tools/libxl/libxl_disk.c | 3 ++- tools/libxl/libxl_nic.c | 3 ++- tools/libxl/libxl_vdispl.c | 2 +- tools/libxl/libxl_vkb.c | 2 +- tools/libxl/libxl_vsnd.c | 4 ++-- tools/libxl/libxl_vtpm.c | 2 +- 8 files changed, 17 insertions(+), 15 deletions(-) diff --git a/tools/libxl/libxl.h b/tools/libxl/libxl.h index 750ef1b7d0..e40546c23a 100644 --- a/tools/libxl/libxl.h +++ b/tools/libxl/libxl.h @@ -1888,7 +1888,7 @@ libxl_device_disk *libxl_device_disk_list(libxl_ctx *= ctx, void libxl_device_disk_list_free(libxl_device_disk* list, int num) LIBXL_EXTERNAL_CALLERS_ONLY; int libxl_device_disk_getinfo(libxl_ctx *ctx, uint32_t domid, - libxl_device_disk *disk, libxl_diskinfo *dis= kinfo) + const libxl_device_disk *disk, libxl_diskinf= o *diskinfo) LIBXL_EXTERNAL_CALLERS_ONLY; =20 /* @@ -1989,7 +1989,7 @@ libxl_device_nic *libxl_device_nic_list(libxl_ctx *ct= x, void libxl_device_nic_list_free(libxl_device_nic* list, int num) LIBXL_EXTERNAL_CALLERS_ONLY; int libxl_device_nic_getinfo(libxl_ctx *ctx, uint32_t domid, - libxl_device_nic *nic, libxl_nicinfo *nicinfo) + const libxl_device_nic *nic, libxl_nicinfo *n= icinfo) LIBXL_EXTERNAL_CALLERS_ONLY; =20 /* @@ -2000,7 +2000,7 @@ libxl_device_channel *libxl_device_channel_list(libxl= _ctx *ctx, uint32_t domid, int *num); int libxl_device_channel_getinfo(libxl_ctx *ctx, uint32_t domid, - libxl_device_channel *channel, + const libxl_device_channel *channel, libxl_channelinfo *channelinfo); =20 /* Virtual TPMs */ @@ -2022,7 +2022,7 @@ libxl_device_vtpm *libxl_device_vtpm_list(libxl_ctx *= ctx, void libxl_device_vtpm_list_free(libxl_device_vtpm*, int num) LIBXL_EXTERNAL_CALLERS_ONLY; int libxl_device_vtpm_getinfo(libxl_ctx *ctx, uint32_t domid, - libxl_device_vtpm *vtpm, libxl_vtpminfo *vtp= minfo) + const libxl_device_vtpm *vtpm, libxl_vtpminf= o *vtpminfo) LIBXL_EXTERNAL_CALLERS_ONLY; =20 /* Virtual displays */ @@ -2045,7 +2045,7 @@ libxl_device_vdispl *libxl_device_vdispl_list(libxl_c= tx *ctx, void libxl_device_vdispl_list_free(libxl_device_vdispl* list, int num) LIBXL_EXTERNAL_CALLERS_ONLY; int libxl_device_vdispl_getinfo(libxl_ctx *ctx, uint32_t domid, - libxl_device_vdispl *vdispl, + const libxl_device_vdispl *vdispl, libxl_vdisplinfo *vdisplinfo) LIBXL_EXTERNAL_CALLERS_ONLY; =20 @@ -2069,7 +2069,7 @@ libxl_device_vsnd *libxl_device_vsnd_list(libxl_ctx *= ctx, void libxl_device_vsnd_list_free(libxl_device_vsnd* list, int num) LIBXL_EXTERNAL_CALLERS_ONLY; int libxl_device_vsnd_getinfo(libxl_ctx *ctx, uint32_t domid, - libxl_device_vsnd *vsnd, + const libxl_device_vsnd *vsnd, libxl_vsndinfo *vsndlinfo) LIBXL_EXTERNAL_CALLERS_ONLY; =20 @@ -2092,7 +2092,7 @@ libxl_device_vkb *libxl_device_vkb_list(libxl_ctx *ct= x, void libxl_device_vkb_list_free(libxl_device_vkb* list, int num) LIBXL_EXTERNAL_CALLERS_ONLY; int libxl_device_vkb_getinfo(libxl_ctx *ctx, uint32_t domid, - libxl_device_vkb *vkb, + const libxl_device_vkb *vkb, libxl_vkbinfo *vkbinfo) LIBXL_EXTERNAL_CALLERS_ONLY; =20 diff --git a/tools/libxl/libxl_console.c b/tools/libxl/libxl_console.c index 36d79f5adc..088a455b52 100644 --- a/tools/libxl/libxl_console.c +++ b/tools/libxl/libxl_console.c @@ -566,7 +566,7 @@ libxl_device_channel *libxl_device_channel_list(libxl_c= tx *ctx, } =20 int libxl_device_channel_getinfo(libxl_ctx *ctx, uint32_t domid, - libxl_device_channel *channel, + const libxl_device_channel *channel, libxl_channelinfo *channelinfo) { GC_INIT(ctx); diff --git a/tools/libxl/libxl_disk.c b/tools/libxl/libxl_disk.c index bc9e2d5a74..d46e78a75c 100644 --- a/tools/libxl/libxl_disk.c +++ b/tools/libxl/libxl_disk.c @@ -598,7 +598,8 @@ int libxl_vdev_to_device_disk(libxl_ctx *ctx, uint32_t = domid, } =20 int libxl_device_disk_getinfo(libxl_ctx *ctx, uint32_t domid, - libxl_device_disk *disk, libxl_diskinfo *dis= kinfo) + const libxl_device_disk *disk, + libxl_diskinfo *diskinfo) { GC_INIT(ctx); char *fe_path, *libxl_path; diff --git a/tools/libxl/libxl_nic.c b/tools/libxl/libxl_nic.c index f2b5e02285..07880b39e1 100644 --- a/tools/libxl/libxl_nic.c +++ b/tools/libxl/libxl_nic.c @@ -399,7 +399,8 @@ void libxl_device_nic_list_free(libxl_device_nic* list,= int num) } =20 int libxl_device_nic_getinfo(libxl_ctx *ctx, uint32_t domid, - libxl_device_nic *nic, libxl_nicinfo *nicinf= o) + const libxl_device_nic *nic, + libxl_nicinfo *nicinfo) { GC_INIT(ctx); char *nicpath, *libxl_path; diff --git a/tools/libxl/libxl_vdispl.c b/tools/libxl/libxl_vdispl.c index c9cc455176..8ddc8940e9 100644 --- a/tools/libxl/libxl_vdispl.c +++ b/tools/libxl/libxl_vdispl.c @@ -152,7 +152,7 @@ static int libxl__device_vdispl_getconnectors(libxl_ctx= *ctx, } =20 int libxl_device_vdispl_getinfo(libxl_ctx *ctx, uint32_t domid, - libxl_device_vdispl *vdispl, + const libxl_device_vdispl *vdispl, libxl_vdisplinfo *info) { GC_INIT(ctx); diff --git a/tools/libxl/libxl_vkb.c b/tools/libxl/libxl_vkb.c index 64e20b772a..26376a7eef 100644 --- a/tools/libxl/libxl_vkb.c +++ b/tools/libxl/libxl_vkb.c @@ -270,7 +270,7 @@ int libxl_devid_to_device_vkb(libxl_ctx *ctx, uint32_t = domid, } =20 int libxl_device_vkb_getinfo(libxl_ctx *ctx, uint32_t domid, - libxl_device_vkb *vkb, + const libxl_device_vkb *vkb, libxl_vkbinfo *info) { GC_INIT(ctx); diff --git a/tools/libxl/libxl_vsnd.c b/tools/libxl/libxl_vsnd.c index 1151cbc567..0bc5f6dbb1 100644 --- a/tools/libxl/libxl_vsnd.c +++ b/tools/libxl/libxl_vsnd.c @@ -563,7 +563,7 @@ static int libxl__device_stream_getinfo(libxl__gc *gc, = const char *path, } =20 static int libxl__device_pcm_getinfo(libxl__gc *gc, const char *path, - libxl_device_vsnd *vsnd, + const libxl_device_vsnd *vsnd, libxl_vsndinfo *info) { int i; @@ -588,7 +588,7 @@ static int libxl__device_pcm_getinfo(libxl__gc *gc, con= st char *path, } =20 int libxl_device_vsnd_getinfo(libxl_ctx *ctx, uint32_t domid, - libxl_device_vsnd *vsnd, + const libxl_device_vsnd *vsnd, libxl_vsndinfo *info) { GC_INIT(ctx); diff --git a/tools/libxl/libxl_vtpm.c b/tools/libxl/libxl_vtpm.c index f750395f6f..dd00b267bb 100644 --- a/tools/libxl/libxl_vtpm.c +++ b/tools/libxl/libxl_vtpm.c @@ -90,7 +90,7 @@ static int libxl__vtpm_from_xenstore(libxl__gc *gc, const= char *libxl_path, =20 int libxl_device_vtpm_getinfo(libxl_ctx *ctx, uint32_t domid, - libxl_device_vtpm *vtpm, + const libxl_device_vtpm *vtpm, libxl_vtpminfo *vtpminfo) { GC_INIT(ctx); --=20 Anthony PERARD _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel