From nobody Sun Feb 8 22:59:43 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) client-ip=205.139.110.61; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 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=1582293189; cv=none; d=zohomail.com; s=zohoarc; b=Cdjg+OrUzUd1VWTYKviw/21Qd6C97ITHKcLUTIL8A5VRxynmNYE9rFUc8ca9buu6lkCyzDlpebiCHGwaTowqpBK1tEhzIF5YWkewjYBeobagFdOIr7sUdp/hew6ZBmD6d1gXLvdjM4Vx4qW/07ALCvvrTxnfOu2wyUdYd6lpPqk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1582293189; 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=ZS2vQmhXmix5XL8zR+/uLu7+3R7wn0fhdeGzAAerseM=; b=Hz/EzJVc9mLm+MTbQ7axyLiuc8t/y4eUNhnHU35kbj8bM8tHjtDM+Re+94A/oSn7CAeM0qS9x7Ytlrl5+L4dSfFyFMZkTAYuFc+I+BftvtChHKKHR6fz69+R2qDyn59mlbbEva/8zuM7DDWLtCaTZ8tD+ZFVE74MyzahMez8QiU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 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-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) by mx.zohomail.com with SMTPS id 1582293189028570.4455617954003; Fri, 21 Feb 2020 05:53:09 -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-168-r3fjPtW7N-Kv-VCcPO3fxQ-1; Fri, 21 Feb 2020 08:52:34 -0500 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 199A2801FC7; Fri, 21 Feb 2020 13:52:29 +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 E6A078B57D; Fri, 21 Feb 2020 13:52:28 +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 900C0860CA; Fri, 21 Feb 2020 13:52:28 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 01LDq0cq032544 for ; Fri, 21 Feb 2020 08:52:00 -0500 Received: by smtp.corp.redhat.com (Postfix) id 5A9895D9C5; Fri, 21 Feb 2020 13:52:00 +0000 (UTC) Received: from angien.redhat.com (unknown [10.43.2.48]) by smtp.corp.redhat.com (Postfix) with ESMTP id D5D8A5DA7B for ; Fri, 21 Feb 2020 13:51:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1582293184; 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=ZS2vQmhXmix5XL8zR+/uLu7+3R7wn0fhdeGzAAerseM=; b=XZuYwHrcZmbLgVSr7gFsbuZk5+COJX+5ZAMfz+v2WaL4s2WNrd1ICosdYrmUTI/vCkcjof OYqkGhWXXBtkb8ubd8yigd9Wah6+xvpO7CvZd17/BBOBqn9HVGWA41ytMoj4pqtpBIo0Be zfWF1y0s0prCtuFZWH3XO4lZTmoP7xw= X-MC-Unique: r3fjPtW7N-Kv-VCcPO3fxQ-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 7/7] virStorageFileGetMetadataFromFD: Remove unused 'backingFormat' argument Date: Fri, 21 Feb 2020 14:51:45 +0100 Message-Id: <1c1f5a53f74fd0c4e1e5c2518ce1f1d7fc1059f6.1582293053.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 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.11 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: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/storage/storage_util.c | 3 +-- src/util/virstoragefile.c | 12 +----------- src/util/virstoragefile.h | 3 +-- 3 files changed, 3 insertions(+), 15 deletions(-) diff --git a/src/storage/storage_util.c b/src/storage/storage_util.c index f71abbd729..8e43c7868d 100644 --- a/src/storage/storage_util.c +++ b/src/storage/storage_util.c @@ -3358,8 +3358,7 @@ storageBackendProbeTarget(virStorageSourcePtr target, if (!(meta =3D virStorageFileGetMetadataFromFD(target->path, fd, - VIR_STORAGE_FILE_AUTO, - NULL))) + VIR_STORAGE_FILE_AUTO))) return -1; if (meta->backingStoreRaw) { diff --git a/src/util/virstoragefile.c b/src/util/virstoragefile.c index 94805e8741..d5ac5970f1 100644 --- a/src/util/virstoragefile.c +++ b/src/util/virstoragefile.c @@ -1161,21 +1161,14 @@ virStorageFileGetMetadataFromBuf(const char *path, virStorageSourcePtr virStorageFileGetMetadataFromFD(const char *path, int fd, - int format, - int *backingFormat) + int format) { ssize_t len =3D VIR_STORAGE_MAX_HEADER; struct stat sb; - int dummy; g_autofree char *buf =3D NULL; g_autoptr(virStorageSource) meta =3D NULL; - if (!backingFormat) - backingFormat =3D &dummy; - - *backingFormat =3D VIR_STORAGE_FILE_NONE; - if (fstat(fd, &sb) < 0) { virReportSystemError(errno, _("cannot stat file '%s'"), path); @@ -1206,9 +1199,6 @@ virStorageFileGetMetadataFromFD(const char *path, if (virStorageFileGetMetadataInternal(meta, buf, len) < 0) return NULL; - if (backingFormat) - *backingFormat =3D meta->backingStoreRawFormat; - if (S_ISREG(sb.st_mode)) meta->type =3D VIR_STORAGE_TYPE_FILE; else if (S_ISBLK(sb.st_mode)) diff --git a/src/util/virstoragefile.h b/src/util/virstoragefile.h index 32f2c82147..5b995d54ab 100644 --- a/src/util/virstoragefile.h +++ b/src/util/virstoragefile.h @@ -381,8 +381,7 @@ int virStorageFileProbeFormat(const char *path, uid_t u= id, gid_t gid); virStorageSourcePtr virStorageFileGetMetadataFromFD(const char *path, int fd, - int format, - int *backingFormat); + int format); virStorageSourcePtr virStorageFileGetMetadataFromBuf(const char *path, char *buf, size_t len, --=20 2.24.1