From patchwork Thu Sep 14 15:38:11 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Liu X-Patchwork-Id: 9953395 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C8E8160230 for ; Thu, 14 Sep 2017 15:41:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C4E2829133 for ; Thu, 14 Sep 2017 15:41:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B99342913E; Thu, 14 Sep 2017 15:41:08 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D238329134 for ; Thu, 14 Sep 2017 15:41:06 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dsWEE-0007KX-D5; Thu, 14 Sep 2017 15:38:58 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dsWED-0007KQ-V2 for xen-devel@lists.xenproject.org; Thu, 14 Sep 2017 15:38:58 +0000 Received: from [193.109.254.147] by server-10.bemta-6.messagelabs.com id B8/0A-03642-192AAB95; Thu, 14 Sep 2017 15:38:57 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrFLMWRWlGSWpSXmKPExsXitHRDpO6ERbs iDU4t17L4vmUykwOjx+EPV1gCGKNYM/OS8isSWDP2rjrKWLCPv2LeozNsDYy7eLoYOTkkBPwl Xi7dzA5iswkoS/zs7GUDsUUE9CSaDjxn7GLk4mAWmMso8e3QerAiYQETifWX7jCD2CwCqhJLO zeygti8AhYSj86vZYYYKi+xq+0iWFxIQEGiY/oxJogaQYmTM5+wgNjMAhISB1+8YJ7AyD0LSW oWktQCRqZVjBrFqUVlqUW6xoZ6SUWZ6RkluYmZObqGBmZ6uanFxYnpqTmJScV6yfm5mxiB4cA ABDsYmxYFHmKU5GBSEuXdq7szUogvKT+lMiOxOCO+qDQntfgQowwHh5IE7/qFuyKFBItS01Mr 0jJzgIEJk5bg4FES4Z0AkuYtLkjMLc5Mh0idYtTl6Lh59w+TEEtefl6qlDhvOUiRAEhRRmke3 AhYlFxilJUS5mUEOkqIpyC1KDezBFX+FaM4B6OSMO9EkCk8mXklcJteAR3BBHTEmdM7QI4oSU RISTUwSjluKd68ZkXw4Tk+eyfMSbr2PcJX/7HsLfa3HfUJB8Kvnj6yWOnbaqPD6Vr1bzmS3v3 l+5pfyVSQHL932T/nuv3reb/pzPzAkd10OTU9a3f3I7UM1l0FN/byS9c6xbZ5R93M6Lr7OexP w76HDUeNDlcfu5UiqdQRYWSQb/x1/eMPToHP2YX7lFiKMxINtZiLihMBf95ppI0CAAA= X-Env-Sender: prvs=423b67c62=wei.liu2@citrix.com X-Msg-Ref: server-3.tower-27.messagelabs.com!1505403534!116505522!1 X-Originating-IP: [66.165.176.89] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni44OSA9PiAyMDMwMDc=\n, received_headers: No Received headers X-StarScan-Received: X-StarScan-Version: 9.4.45; banners=-,-,- X-VirusChecked: Checked Received: (qmail 10083 invoked from network); 14 Sep 2017 15:38:56 -0000 Received: from smtp.citrix.com (HELO SMTP.CITRIX.COM) (66.165.176.89) by server-3.tower-27.messagelabs.com with RC4-SHA encrypted SMTP; 14 Sep 2017 15:38:56 -0000 X-IronPort-AV: E=Sophos;i="5.42,393,1500940800"; d="scan'208";a="439785931" From: Wei Liu To: Xen-devel Date: Thu, 14 Sep 2017 16:38:11 +0100 Message-ID: <20170914153811.30588-1-wei.liu2@citrix.com> X-Mailer: git-send-email 2.11.0 MIME-Version: 1.0 Cc: Ian Jackson , Wei Liu , Oleksandr Grytsov , Jan Beulich Subject: [Xen-devel] [PATCH v2] libxl: fix disk listing function X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP The path should be "vbd" not "disk". Fixes fbbaf2cc9 ("libxl: change disk to use generic getting list functions"). Signed-off-by: Wei Liu Acked-by: Ian Jackson --- Cc: Jan Beulich Cc: Ian Jackson Cc: Oleksandr Grytsov This should unblock staging. --- tools/libxl/libxl_checkpoint_device.c | 2 +- tools/libxl/libxl_disk.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/libxl/libxl_checkpoint_device.c b/tools/libxl/libxl_checkpoint_device.c index d1cc155955..ef212e4051 100644 --- a/tools/libxl/libxl_checkpoint_device.c +++ b/tools/libxl/libxl_checkpoint_device.c @@ -68,7 +68,7 @@ void libxl__checkpoint_devices_setup(libxl__egc *egc, if (cds->device_kind_flags & (1 << LIBXL__DEVICE_KIND_VBD)) cds->disks = libxl__device_list(gc, &libxl__disk_devtype, cds->domid, - "disk", &cds->num_disks); + "vbd", &cds->num_disks); if (cds->num_nics == 0 && cds->num_disks == 0) goto out; diff --git a/tools/libxl/libxl_disk.c b/tools/libxl/libxl_disk.c index cfa5e8ae69..06dd4d3193 100644 --- a/tools/libxl/libxl_disk.c +++ b/tools/libxl/libxl_disk.c @@ -628,7 +628,7 @@ libxl_device_disk *libxl_device_disk_list(libxl_ctx *ctx, uint32_t domid, int *n GC_INIT(ctx); - r = libxl__device_list(gc, &libxl__disk_devtype, domid, "disk", num); + r = libxl__device_list(gc, &libxl__disk_devtype, domid, "vbd", num); GC_FREE; @@ -741,7 +741,7 @@ int libxl_cdrom_insert(libxl_ctx *ctx, uint32_t domid, libxl_device_disk *disk, goto out; } - disks = libxl__device_list(gc, &libxl__disk_devtype, domid, "disk", &num); + disks = libxl__device_list(gc, &libxl__disk_devtype, domid, "vbd", &num); for (i = 0; i < num; i++) { if (disks[i].is_cdrom && !strcmp(disk->vdev, disks[i].vdev)) {