From nobody Sun Feb 8 16:34:01 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1611257770; cv=none; d=zohomail.com; s=zohoarc; b=O9OwqR+jOA17gyuOXOCem7/hfZjLUB3HzeVTOwPsmzAPqdVZFJKQAjKVIzrtaL+DsZuBQroNrnGZ59s9vCzHfnGVg/UP30fN/Mj63zC89dKTKqyzWy9TpEMTrBGk7Tbd3jbXoM/pzE4sZTCdrBooVuNnLdpFTGYlAh8Y8/TnEkU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611257770; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=vJxCjVvb6Vrov1zsCaKFfvsCvfU5Js7/m4mB2B9o5sg=; b=YGurSmRPbakxz9sUas2y+bQFNZDQyodomlTtxnJFs44kK0DnZuW9uywsIIMwc41eFR6RY32XKcWlXqGJkdZXkiHIKPg5XhsviTr8PMYf5MFwP3pbPvNmObqhfz5kaHZjvtFIq4fTMFHzeskOQYvHSIel/xn+b3zSTZJ4Vxc3WYs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.zohomail.com with SMTPS id 1611257770759278.68211718866644; Thu, 21 Jan 2021 11:36:10 -0800 (PST) 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-519-KHwym60VON61aPpTX51avw-1; Thu, 21 Jan 2021 14:35:05 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id AC37D1842149; Thu, 21 Jan 2021 19:34:56 +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 8813A5D9E3; Thu, 21 Jan 2021 19:34:56 +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 4DD951809CB1; Thu, 21 Jan 2021 19:34:56 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 10LJYrsQ023286 for ; Thu, 21 Jan 2021 14:34:53 -0500 Received: by smtp.corp.redhat.com (Postfix) id 3E39110023AE; Thu, 21 Jan 2021 19:34:53 +0000 (UTC) Received: from antique-laptop.redhat.com (unknown [10.40.208.8]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9A780100AE3F for ; Thu, 21 Jan 2021 19:34:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1611257769; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=vJxCjVvb6Vrov1zsCaKFfvsCvfU5Js7/m4mB2B9o5sg=; b=dXgNVSmrz6F+gwDctXp4y6YJfxqB6wJoRmM8JWZzVO/LMusf5WiocCvjDgIeJYTB0+zg23 ZPHoelolicHp6hBwvk7GU+pn7pioqecMt+KFU34afxlOSItJiajCoQyXl5hzvH1I+Hn/A5 Cr2cVmr2B1Wq9TRKjUTWxjdpobEDMKM= X-MC-Unique: KHwym60VON61aPpTX51avw-1 From: Pavel Hrdina To: libvir-list@redhat.com Subject: [libvirt PATCH v2 12/13] virstoragefile: use virStorageFile prefix for all functions Date: Thu, 21 Jan 2021 20:34:26 +0100 Message-Id: <28b9b89c6ae5556fdb8ae3f885cbc077651236f9.1611257578.git.phrdina@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com 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.14 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 X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Signed-off-by: Pavel Hrdina Reviewed-by: Peter Krempa --- src/libvirt_private.syms | 4 ++-- src/qemu/qemu_block.c | 2 +- src/qemu/qemu_snapshot.c | 2 +- src/storage_file/storage_source.c | 6 +++--- src/util/virstoragefile.c | 6 +++--- src/util/virstoragefile.h | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index e8fe8e6c12..088474d54b 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -3216,10 +3216,10 @@ virSocketAddrSetPort; virStorageFileCanonicalizePath; virStorageFileGetNPIVKey; virStorageFileGetSCSIKey; +virStorageFileIsFile; +virStorageFileIsRelative; virStorageFileParseBackingStoreStr; virStorageFileParseChainIndex; -virStorageIsFile; -virStorageIsRelative; =20 =20 # util/virstring.h diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_block.c index ca23466b22..fafa35071c 100644 --- a/src/qemu/qemu_block.c +++ b/src/qemu/qemu_block.c @@ -3439,7 +3439,7 @@ qemuBlockUpdateRelativeBacking(virDomainObjPtr vm, if (rc < 0) return rc; =20 - if (backingStoreStr && virStorageIsRelative(backingStoreStr)) + if (backingStoreStr && virStorageFileIsRelative(backingStoreStr)) n->backingStore->relPath =3D g_steal_pointer(&backingStoreStr); } =20 diff --git a/src/qemu/qemu_snapshot.c b/src/qemu/qemu_snapshot.c index 994c7dc60b..699090ae40 100644 --- a/src/qemu/qemu_snapshot.c +++ b/src/qemu/qemu_snapshot.c @@ -1094,7 +1094,7 @@ qemuSnapshotDiskPrepareOne(virDomainObjPtr vm, if (virStorageFileGetBackingStoreStr(dd->src, &backingStor= eStr) < 0) return -1; if (backingStoreStr !=3D NULL) { - if (virStorageIsRelative(backingStoreStr)) + if (virStorageFileIsRelative(backingStoreStr)) dd->relPath =3D g_steal_pointer(&backingStoreStr); } } diff --git a/src/storage_file/storage_source.c b/src/storage_file/storage_s= ource.c index d1e0aeb2c1..ffc7fe8ea5 100644 --- a/src/storage_file/storage_source.c +++ b/src/storage_file/storage_source.c @@ -185,7 +185,7 @@ virStorageFileChainLookup(virStorageSourcePtr chain, { virStorageSourcePtr prev; const char *start =3D chain->path; - bool nameIsFile =3D virStorageIsFile(name); + bool nameIsFile =3D virStorageFileIsFile(name); =20 if (!parent) parent =3D &prev; @@ -1532,7 +1532,7 @@ virStorageSourceNewFromBackingAbsolute(const char *pa= th, =20 *src =3D NULL; =20 - if (virStorageIsFile(path)) { + if (virStorageFileIsFile(path)) { def->type =3D VIR_STORAGE_TYPE_FILE; =20 def->path =3D g_strdup(path); @@ -1604,7 +1604,7 @@ virStorageSourceNewFromChild(virStorageSourcePtr pare= nt, =20 *child =3D NULL; =20 - if (virStorageIsRelative(parentRaw)) { + if (virStorageFileIsRelative(parentRaw)) { if (!(def =3D virStorageSourceNewFromBackingRelative(parent, paren= tRaw))) return -1; } else { diff --git a/src/util/virstoragefile.c b/src/util/virstoragefile.c index 85ccd9f52c..c9c735831d 100644 --- a/src/util/virstoragefile.c +++ b/src/util/virstoragefile.c @@ -38,7 +38,7 @@ VIR_LOG_INIT("util.storagefile"); =20 =20 bool -virStorageIsFile(const char *backing) +virStorageFileIsFile(const char *backing) { char *colon; char *slash; @@ -59,12 +59,12 @@ virStorageIsFile(const char *backing) =20 =20 bool -virStorageIsRelative(const char *backing) +virStorageFileIsRelative(const char *backing) { if (backing[0] =3D=3D '/') return false; =20 - if (!virStorageIsFile(backing)) + if (!virStorageFileIsFile(backing)) return false; =20 return true; diff --git a/src/util/virstoragefile.h b/src/util/virstoragefile.h index 2c1a250f20..e56796ec95 100644 --- a/src/util/virstoragefile.h +++ b/src/util/virstoragefile.h @@ -33,8 +33,8 @@ int virStorageFileParseBackingStoreStr(const char *str, unsigned int *chainIndex) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(3); =20 -bool virStorageIsFile(const char *path); -bool virStorageIsRelative(const char *backing); +bool virStorageFileIsFile(const char *path); +bool virStorageFileIsRelative(const char *backing); =20 int virStorageFileGetSCSIKey(const char *path, char **key, --=20 2.29.2