From nobody Sun Feb 8 23:03:46 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=quarantine dis=quarantine) header.from=suse.com Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1623717663407140.59250500316784; Mon, 14 Jun 2021 17:41:03 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-390-qOrSymosOYyq-QtfnjUMdw-1; Mon, 14 Jun 2021 20:41:00 -0400 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id CC361EC1A3; Tue, 15 Jun 2021 00:40:55 +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 A050C5D703; Tue, 15 Jun 2021 00:40:55 +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 6D4C046F5D; Tue, 15 Jun 2021 00:40:55 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 15F0dh3j002045 for ; Mon, 14 Jun 2021 20:39:44 -0400 Received: by smtp.corp.redhat.com (Postfix) id D36F2200E4A7; Tue, 15 Jun 2021 00:39:43 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast01.extmail.prod.ext.rdu2.redhat.com [10.11.55.17]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CE138218ADFD for ; Tue, 15 Jun 2021 00:39:41 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 40E22857AA4 for ; Tue, 15 Jun 2021 00:39:41 +0000 (UTC) Received: from de-smtp-delivery-102.mimecast.com (de-smtp-delivery-102.mimecast.com [194.104.111.102]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-562--IS7GA02OamTbUeJweh3jA-1; Mon, 14 Jun 2021 20:39:38 -0400 Received: from EUR03-VE1-obe.outbound.protection.outlook.com (mail-ve1eur03lp2057.outbound.protection.outlook.com [104.47.9.57]) (Using TLS) by relay.mimecast.com with ESMTP id de-mta-28-Qf-Hq4PSNwCWh_9-D6aMng-1; Tue, 15 Jun 2021 02:39:35 +0200 Received: from AM9PR04MB8602.eurprd04.prod.outlook.com (2603:10a6:20b:439::12) by AM9PR04MB9013.eurprd04.prod.outlook.com (2603:10a6:20b:409::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4219.24; Tue, 15 Jun 2021 00:39:34 +0000 Received: from AM9PR04MB8602.eurprd04.prod.outlook.com ([fe80::cd4e:6cc0:8021:f249]) by AM9PR04MB8602.eurprd04.prod.outlook.com ([fe80::cd4e:6cc0:8021:f249%4]) with mapi id 15.20.4219.025; Tue, 15 Jun 2021 00:39:34 +0000 Received: from localhost (139.212.193.237) by HK2P15301CA0011.APCP153.PROD.OUTLOOK.COM (2603:1096:202:1::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4264.1 via Frontend Transport; Tue, 15 Jun 2021 00:39:33 +0000 X-MC-Unique: qOrSymosOYyq-QtfnjUMdw-1 X-MC-Unique: -IS7GA02OamTbUeJweh3jA-1 X-MC-Unique: Qf-Hq4PSNwCWh_9-D6aMng-1 From: Lin Ma To: libvir-list@redhat.com Subject: [libvirt] [PATCH 08/12] virsh-pool: Remove static from virshStoragePoolList{Free, Collect} Date: Tue, 15 Jun 2021 08:38:28 +0800 Message-ID: <20210615003832.5571-9-lma@suse.com> In-Reply-To: <20210615003832.5571-1-lma@suse.com> References: <20210615003832.5571-1-lma@suse.com> X-Originating-IP: [139.212.193.237] X-ClientProxiedBy: HK2P15301CA0011.APCP153.PROD.OUTLOOK.COM (2603:1096:202:1::21) To AM9PR04MB8602.eurprd04.prod.outlook.com (2603:10a6:20b:439::12) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: aa6f945b-7e48-4b0b-b8a1-08d92f960c22 X-MS-TrafficTypeDiagnostic: AM9PR04MB9013: X-LD-Processed: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba,ExtFwd X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:345 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0 X-Microsoft-Antispam-Message-Info: zfK/Tt+XGg9WDHyOH4iiMm4vef68LNhrVRaf1EC97eIvanfHyXAKSzZgnQmeWxW50WeQwnzhNy8MtzOddmf+XoEuDRahWdylIZWyv6K/9JhqTP50psOLcP0uKACzQH8yhV5ZAN52H0YK0H9LFEnGno4TXkAubRkkIEidxFPQ+yP8MvpBBEqN/5KA+Cye92t72uy9WIngCZ8wXuSRNCjNXGBEmH06o8neHK0RVUNeIr6L7PnaC8FnzE2oTqa9IyZ0GKJzuvc1pJwTH6gZxi4kdr/qyguA3Pn8XixGDYVgLP/DjBXASPrQSPR7hvK9iGJS8N1mP/hb6pUsR3kX4PX0TcFNgMLBllsWI1AodevfXF40WyotEwAjeh1bfgl3UN38AJym4YHhgmnL3h4oBKGPPntfsk2lntemZ56EfEHTyb0BctkJYKxh8eRPmp4KujUHCGE6nLwcbi6cMiWTIeZhrP8ybnk74k0LZxc3pFEfkgyAhS+SsrqvlE8TcK2iDhZHQWMGe4+/Gpmo14cxaNAM7lZMwfnrTJdBAEZWSreEaTQDzkPsRQmoROkg5Br35WG5nrbI/ujnO79zQOm7mClhQw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM9PR04MB8602.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(39860400002)(346002)(366004)(376002)(136003)(396003)(107886003)(186003)(16526019)(36756003)(6486002)(4326008)(478600001)(316002)(5660300002)(83380400001)(66946007)(66476007)(66556008)(6916009)(86362001)(38100700002)(8936002)(26005)(450100002)(956004)(1076003)(6496006)(2616005)(6666004)(8676002)(2906002); DIR:OUT; SFP:1101 X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?Gw0sbwUk1/JvMyOqbduT5SKrAKjdf3AZCpI5W6lNYAmZafoVxKa210hu9UHU?= =?us-ascii?Q?ZIUERBIL/r/cdbqNw2GEwiEFJC0L87Hhf7LYZdxj4xnHNJo4jRkajlt1SHDZ?= =?us-ascii?Q?FnqydoD0ZrIYHgptERMxFz5stNu+bsFr0/1RQGhmuCO9AREuM5f1yYUAXbM2?= =?us-ascii?Q?IXGHkp15ZtZE/BZivuNMYr4nL2zNU2OVmdgTwBiZBLVppT7JbKAAToTw6Xcv?= =?us-ascii?Q?OeHeLgbH0n1VY9LiN8A3qI76TsbhUPE6vkcE6ChwHbYcFYtPWQOvHCuxIO30?= =?us-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loMxmBmJs?= =?us-ascii?Q?LG800miuU+KM8R7A+8vDiaB9rypSx6Qy8Ig6MgEQCF3Hfg5OzyeqTnYuBz2O?= =?us-ascii?Q?30hdkMJFkcb9LKvHKOjB9j5xgbVy4LGyK9yE6Ge6XCDIxqXAWPx5K6pZBT6m?= =?us-ascii?Q?G6nwqAssfYbHegA0xIBSYibx?= X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: aa6f945b-7e48-4b0b-b8a1-08d92f960c22 X-MS-Exchange-CrossTenant-AuthSource: AM9PR04MB8602.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Jun 2021 00:39:34.7008 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: rPy7DiLc/VA7XRQFbe6XATObWyK5Ve2nG4zb72zD7GiPCQLaMmMWkFtguScMXtz+ X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR04MB9013 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id 15F0dh3j002045 X-loop: libvir-list@redhat.com Cc: mprivozn@redhat.com, Lin Ma 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The functions will be used by next patch. Signed-off-by: Lin Ma --- tools/virsh-pool.c | 10 ++-------- tools/virsh-pool.h | 11 +++++++++++ 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/tools/virsh-pool.c b/tools/virsh-pool.c index 34ed86152e..18f3839a4c 100644 --- a/tools/virsh-pool.c +++ b/tools/virsh-pool.c @@ -835,13 +835,7 @@ virshStoragePoolSorter(const void *a, const void *b) virStoragePoolGetName(*pb)); } =20 -struct virshStoragePoolList { - virStoragePoolPtr *pools; - size_t npools; -}; - -static void -virshStoragePoolListFree(struct virshStoragePoolList *list) +void virshStoragePoolListFree(struct virshStoragePoolList *list) { size_t i; =20 @@ -855,7 +849,7 @@ virshStoragePoolListFree(struct virshStoragePoolList *l= ist) g_free(list); } =20 -static struct virshStoragePoolList * +struct virshStoragePoolList * virshStoragePoolListCollect(vshControl *ctl, unsigned int flags) { diff --git a/tools/virsh-pool.h b/tools/virsh-pool.h index 219f0eea42..d7bacd8731 100644 --- a/tools/virsh-pool.h +++ b/tools/virsh-pool.h @@ -40,3 +40,14 @@ typedef struct virshPoolEventCallback virshPoolEventCall= back; extern virshPoolEventCallback virshPoolEventCallbacks[]; =20 extern const vshCmdDef storagePoolCmds[]; + +struct virshStoragePoolList { + virStoragePoolPtr *pools; + size_t npools; +}; + +struct virshStoragePoolList * +virshStoragePoolListCollect(vshControl *ctl, + unsigned int flags); + +void virshStoragePoolListFree(struct virshStoragePoolList *list); --=20 2.26.2