From nobody Sun Feb 8 17:22:32 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 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=1565783901; cv=none; d=zoho.com; s=zohoarc; b=RhUqzSd1fWNnjzOsCslthAQaXH3eSDrBDcwajapRIYGFZev13Des5qKkY4ORkXRZ1Nk11SOKiT7bExZi7O7pdKIKGmeABUiRpjNxSjFz0E1IJixZ9/WC0avCY/1/fhUXGutqu/W19nY1zMmN4lcxB0XPhM67z9U0ANQLdXsSnrs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1565783901; 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:ARC-Authentication-Results; bh=Ld6xkzZYnvTHPL+y/nB9CRxeWokzJSqSBBuHLVnIZnY=; b=nnNrx0qL3DDGpW2nFXSdmWnm/Oz2C2vOBbYr89tPI9ZzkEjV0N4Min6RQg9CYn9MgjCUQF33rHIxcxA17CgxWHEizH6X/1UYDopilRwgxkGFuRzENxuAvPgj3j7Ou3jkH2gnTp425f3eStNKKK1/2ZSZDrM9tEX4IQMcQP/wF2M= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 156578390178824.147100294598886; Wed, 14 Aug 2019 04:58:21 -0700 (PDT) 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 mx1.redhat.com (Postfix) with ESMTPS id 9779B309843C; Wed, 14 Aug 2019 11:58:20 +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 6CF55891B9; Wed, 14 Aug 2019 11:58:20 +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 298DA24F33; Wed, 14 Aug 2019 11:58:20 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x7EBw3OY015537 for ; Wed, 14 Aug 2019 07:58:03 -0400 Received: by smtp.corp.redhat.com (Postfix) id 8CCBE34942; Wed, 14 Aug 2019 11:58:03 +0000 (UTC) Received: from moe.brq.redhat.com (unknown [10.43.2.30]) by smtp.corp.redhat.com (Postfix) with ESMTP id 18A8C348C3 for ; Wed, 14 Aug 2019 11:58:01 +0000 (UTC) From: Michal Privoznik To: libvir-list@redhat.com Date: Wed, 14 Aug 2019 13:57:36 +0200 Message-Id: <190ae2ea26d0a199260e6fc97cc90fc413ad589a.1565777704.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 07/18] virpcimock: Rename @fakesysfspcidir 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: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.42]); Wed, 14 Aug 2019 11:58:21 +0000 (UTC) Content-Type: text/plain; charset="utf-8" We will need to create more directories and instead of introducing bunch of new variables to hold their actual paths, we can have one and reuse it. Signed-off-by: Michal Privoznik Reviewed-by: Daniel Henrique Barboza --- tests/virpcimock.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/virpcimock.c b/tests/virpcimock.c index 296da9b453..e97dbd81f8 100644 --- a/tests/virpcimock.c +++ b/tests/virpcimock.c @@ -831,7 +831,7 @@ init_syms(void) static void init_env(void) { - VIR_AUTOFREE(char *) fakesysfspcidir =3D NULL; + VIR_AUTOFREE(char *) tmp =3D NULL; =20 if (fakerootdir) return; @@ -839,14 +839,14 @@ init_env(void) if (!(fakerootdir =3D getenv("LIBVIRT_FAKE_ROOT_DIR"))) ABORT("Missing LIBVIRT_FAKE_ROOT_DIR env variable\n"); =20 - if (virAsprintfQuiet(&fakesysfspcidir, "%s%s", + if (virAsprintfQuiet(&tmp, "%s%s", fakerootdir, SYSFS_PCI_PREFIX) < 0) ABORT_OOM(); =20 - if (virFileMakePath(fakesysfspcidir) < 0) - ABORT("Unable to create: %s", fakesysfspcidir); + if (virFileMakePath(tmp) < 0) + ABORT("Unable to create: %s", tmp); =20 - make_file(fakesysfspcidir, "drivers_probe", NULL, -1); + make_file(tmp, "drivers_probe", NULL, -1); =20 # define MAKE_PCI_DRIVER(name, ...) \ pci_driver_new(name, 0, __VA_ARGS__, -1, -1) --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list