From nobody Sat Feb 7 08:23:22 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) client-ip=207.211.31.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by mx.zohomail.com with SMTPS id 1580217146270562.0167744586712; Tue, 28 Jan 2020 05:12:26 -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-347-0aJLZaeEMjuPlgewed8NAA-1; Tue, 28 Jan 2020 08:12:22 -0500 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 0CCD9107ACC5; Tue, 28 Jan 2020 13:12:17 +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 8C21C87043; Tue, 28 Jan 2020 13:12:16 +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 27F4485E44; Tue, 28 Jan 2020 13:12:16 +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 00SDC1lF019201 for ; Tue, 28 Jan 2020 08:12:01 -0500 Received: by smtp.corp.redhat.com (Postfix) id 212E51001B3F; Tue, 28 Jan 2020 13:12:01 +0000 (UTC) Received: from domokun.gsslab.fab.redhat.com (unknown [10.33.8.110]) by smtp.corp.redhat.com (Postfix) with ESMTP id 86D4B1001DD8; Tue, 28 Jan 2020 13:11:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1580217145; 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=oRnengYz+E1QG+aurkmA9qvFCtPzSzte9Ze2tVvi5LU=; b=DXJvB09t+TqzbIhuCXHPQsRLdP9T4Y6NiK9fssuq5kRv7xLQhI4ORX67sxIvSDp0Ba5sfv 9n3gb7/xh2dAF9TAnkaFgnLO35pIWUIgK4otP0IBYksD8pwLITKs3wmQNYcdU7GWOStcye as29SYnpWLXQU4Xc4cfWbVgTjiycTPk= From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Subject: [libvirt PATCH v2 14/56] src: replace mkdir() with g_mkdir() Date: Tue, 28 Jan 2020 13:10:55 +0000 Message-Id: <20200128131137.1762449-15-berrange@redhat.com> In-Reply-To: <20200128131137.1762449-1-berrange@redhat.com> References: <20200128131137.1762449-1-berrange@redhat.com> 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.15 X-MC-Unique: 0aJLZaeEMjuPlgewed8NAA-1 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" g_mkdir() provides portability to Windows platforms. Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Pavel Hrdina --- src/util/virfile.c | 2 +- tests/virlockspacetest.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util/virfile.c b/src/util/virfile.c index 51a0d40b50..d0e0062aa7 100644 --- a/src/util/virfile.c +++ b/src/util/virfile.c @@ -3029,7 +3029,7 @@ virFileMakePathHelper(char *path, mode_t mode) *p =3D '/'; } =20 - if (mkdir(path, mode) < 0 && errno !=3D EEXIST) + if (g_mkdir(path, mode) < 0 && errno !=3D EEXIST) return -1; =20 return 0; diff --git a/tests/virlockspacetest.c b/tests/virlockspacetest.c index 57deb288a9..40395e8c72 100644 --- a/tests/virlockspacetest.c +++ b/tests/virlockspacetest.c @@ -300,7 +300,7 @@ static int testLockSpaceResourceLockPath(const void *ar= gs G_GNUC_UNUSED) if (!(lockspace =3D virLockSpaceNew(NULL))) goto cleanup; =20 - if (mkdir(LOCKSPACE_DIR, 0700) < 0) + if (g_mkdir(LOCKSPACE_DIR, 0700) < 0) goto cleanup; =20 if (virLockSpaceCreateResource(lockspace, LOCKSPACE_DIR "/foo") < 0) --=20 2.24.1