From nobody Mon Feb 9 02:13:17 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.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 216.205.24.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 [216.205.24.124]) by mx.zohomail.com with SMTPS id 1623830606335214.18299812619864; Wed, 16 Jun 2021 01:03:26 -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-187-jD6trEEOONeOj_pl5K_RHA-1; Wed, 16 Jun 2021 04:03:23 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 505C1100A8EB; Wed, 16 Jun 2021 08:03:18 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0D9C719630; Wed, 16 Jun 2021 08:03:18 +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 75AB61809CAD; Wed, 16 Jun 2021 08:03:13 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 15G83BXw002284 for ; Wed, 16 Jun 2021 04:03:12 -0400 Received: by smtp.corp.redhat.com (Postfix) id DC0CE115D7B1; Wed, 16 Jun 2021 08:03:11 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast06.extmail.prod.ext.rdu2.redhat.com [10.11.55.22]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D710B115D7B4 for ; Wed, 16 Jun 2021 08:03:09 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.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 2EE1B1825065 for ; Wed, 16 Jun 2021 08:03:09 +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-235-DkNLOuWIO8WyBUS2DLXeiQ-1; Wed, 16 Jun 2021 04:03:07 -0400 Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-db3eur04lp2051.outbound.protection.outlook.com [104.47.12.51]) (Using TLS) by relay.mimecast.com with ESMTP id de-mta-32-a8bP2uRJMN66Vr-jcChQ2A-1; Wed, 16 Jun 2021 10:03:05 +0200 Received: from AM9PR04MB8602.eurprd04.prod.outlook.com (2603:10a6:20b:439::12) by AM9PR04MB8892.eurprd04.prod.outlook.com (2603:10a6:20b:40b::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4242.16; Wed, 16 Jun 2021 08:03:04 +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.4242.019; Wed, 16 Jun 2021 08:03:04 +0000 Received: from localhost (60.251.47.115) by PR3P251CA0018.EURP251.PROD.OUTLOOK.COM (2603:10a6:102:b5::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4242.16 via Frontend Transport; Wed, 16 Jun 2021 08:03:03 +0000 X-MC-Unique: jD6trEEOONeOj_pl5K_RHA-1 X-MC-Unique: DkNLOuWIO8WyBUS2DLXeiQ-1 X-MC-Unique: a8bP2uRJMN66Vr-jcChQ2A-1 From: Lin Ma To: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 1/5] virsh-pool: Remove static from virshStoragePoolList{Free, Collect} Date: Wed, 16 Jun 2021 16:02:50 +0800 Message-ID: <20210616080254.19513-2-lma@suse.com> In-Reply-To: <20210616080254.19513-1-lma@suse.com> References: <20210616080254.19513-1-lma@suse.com> X-Originating-IP: [60.251.47.115] X-ClientProxiedBy: PR3P251CA0018.EURP251.PROD.OUTLOOK.COM (2603:10a6:102:b5::26) 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: 603f373b-6d5c-4269-5c74-08d9309d2b06 X-MS-TrafficTypeDiagnostic: AM9PR04MB8892: 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: Ra15TD5BLm/YUie1yCES9HyYJKoxw5WpeoKicqTLDbsJH6Ko+OTt5f2vWHVZCQmXYjh33a5ozBYg/OdiCYTSOC3g7kqm2Pq64upvzZpKrbWJDreElC3itKW9G4iL1OBTuMl1aG5GUieXKy9BjFWGtNhb1QgVVVGRFozlbd8Mx7CmFgXpnU+yoSrVhGn8hQ1H8hO+dyjGy1FaOsw2pgu1FZHdJAsz57l+/Gqlb0ZOkQbm5r+LHpIGjtTN8OqanKitOklIbvgaRs5Jlv/CdsWEJv4hD4S+BXW+i2r11L165MkucqG/pG5HCP2y58Xm8y6jBv8nN03E5l40VQ5erQycoY3bEDnU8E7LF9g/huljuKfafISlsGNKvyWyavXrsWpSsl/2/qUWqrHh0sYGodQDMTGX4UN0ZdVVaAQk+5hx8E1mzeEad9kJzOgpIAPE1PGFvWpO1e29xtOZiLluT+MAIAafVEQ153EanQluxsD2+We7dIUN3AIPQG93bv6x0n6A3/b6KXfbIUTf8ExvSzIwiKD3o3EDLCa4f7aWw0SkN3R8WDLcJWQmFrJpZXrHWE1n0zNspsF2yR3BEzsZK3o8lw== 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:(396003)(376002)(346002)(39860400002)(366004)(136003)(8936002)(26005)(6916009)(86362001)(956004)(4326008)(478600001)(316002)(2616005)(2906002)(38100700002)(83380400001)(36756003)(186003)(1076003)(8676002)(16526019)(66946007)(6486002)(66476007)(450100002)(5660300002)(107886003)(6666004)(55236004)(6496006)(66556008); DIR:OUT; SFP:1101 X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?g0sfUXN07ZL5ZWoKBlNAYxGrCiTihjExufxeVcqDsNr4YufEskk3/0Z+yMzY?= =?us-ascii?Q?cxXKoC7RRhlwRiOixeI/VizvmGjj3M2hh6n+NNQWyR3c9ZaUQJy/tfySspAo?= =?us-ascii?Q?pyrSxlWFg2qJHkY1N0dE2ngZwdL/QoOh+ERGauW13w12gTFoGxBbnszSgY8y?= =?us-ascii?Q?oTntxbfJSVnfkvD6zB+vziz6nAGGFjCiAzb5BIOPT//Jsqv7eTGp0ayQiYwN?= =?us-ascii?Q?9ZexgvYjOhlvyMK1Z5pD8Wb8U5Llvtbkq2dN+oThLCQg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vm+7Fjt1Rqml/cJEVZDXGJ44KhpKFJG7wFt?= =?us-ascii?Q?zfUgUITTO3jpqMEXgvC22fG3BCycd8eD66vDyuA4a18BnSVtPXw/ACc0ASel?= =?us-ascii?Q?5/mc7I091lrF++O+sUG1nfNpqiBfitUrxmdvmcwL659kzYtkGNvmzfQpIQXa?= =?us-ascii?Q?OJcq/jf2M41CyVU/MWgzQwmf?= X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: 603f373b-6d5c-4269-5c74-08d9309d2b06 X-MS-Exchange-CrossTenant-AuthSource: AM9PR04MB8602.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Jun 2021 08:03:04.2518 (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: QCSXVdhmW+kFxTzwCNoY50BAT4gwH7Y/WC71P1i1gb+KTg9m6yzqCRPsoa78biAO X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR04MB8892 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.3 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id 15G83BXw002284 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.11 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