From nobody Wed Feb 11 02:08:54 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1666896801; cv=none; d=zohomail.com; s=zohoarc; b=iPJTAIyEe6VS+miYEb3Gbixx9cSpaMB2ehZk8ZXeOXk+hE9GEThQMrS+xBvNBCzlbY1mtZXr+uqytzg//XhJKpE+/O9kgEqWbNsqDLBhxxrozS4zXd2ndNjpHubv7WOuN0yhUFMBbrdmqISV3xHWqza+TpInXX29IFKuPjOWDXQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1666896801; h=Content-Type:Content-Transfer-Encoding:Cc: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=kxOg283PDRzw1JKCDvt6daLgqQYdA1dzevXBfcHGyeE=; b=fk/Z/DloAwuJ/91ZuCU72OUFWjRqMH+PE7sNuCmnFUWcXBpkVMo/Bf63bRTybV4L/OzHPiftewAD3OElqSD6BmORStW4jnwc4G4wHUCPUH/4sea71GsPZPEsFHTuS9H3VnP5oRozaZdwJFr5rPkGojscin2NXZo9HUm6SCTJhhE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTP id 1666896801676175.21865107137; Thu, 27 Oct 2022 11:53:21 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oo7nF-0002X1-0g; Thu, 27 Oct 2022 14:39:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oo7kN-0001Ql-GG for qemu-devel@nongnu.org; Thu, 27 Oct 2022 14:36:55 -0400 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oo7kH-0003MH-EG for qemu-devel@nongnu.org; Thu, 27 Oct 2022 14:36:55 -0400 Received: by mail-wr1-x435.google.com with SMTP id z14so3674060wrn.7 for ; Thu, 27 Oct 2022 11:36:48 -0700 (PDT) Received: from zen.linaroharston ([185.81.254.11]) by smtp.gmail.com with ESMTPSA id n4-20020a056000170400b002302dc43d77sm1915829wrc.115.2022.10.27.11.36.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Oct 2022 11:36:44 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 8FE221FFC4; Thu, 27 Oct 2022 19:36:38 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=kxOg283PDRzw1JKCDvt6daLgqQYdA1dzevXBfcHGyeE=; b=wmLL495czepYmkyydFGd6Q9CqrIQLowE+DzTWKZyfiV8bctujX4+STGWczl0GSPKTy L/+Bh1lovsNQrskycn+Z25iv1fP5a0GcfAh0cpFWn5JT5y3W6kFNsPwg+bZDCn6LQt7l HrT+VmU/uSu3lGIrVxuj6rPbyvTqyQX4iyT9zdtZWtiNUBSXUCn8au9cXjPrR+FzYLO0 PBgVHaqzg57Xco47hoA6LBl4g7YjCPHcyj+atYQqFO6ZSsv1jGuzFgJEyGho1V/feZnu cCwOJmqzH3XCblfwpFVs48ilbZwIEXkYLi24w/o955+QB64v0v31XeMm2fwHv/VsucCI 9dmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=kxOg283PDRzw1JKCDvt6daLgqQYdA1dzevXBfcHGyeE=; b=2gqcZ8jwkHFUoUWIpgc5EYa3ORCmst69nBGE+hkNA3B+s+yJ6AS0Zx1D3BariaThhk wVsMS9rPi9DAr99FNjdzfOWz2ozQ1VGKxUczB+RF0RKsbHLzTfzyw9r4GMSTLqfvhHJw QEh4Qe+KLs5fbV7t3XyQLwSGv3k6pcYfCTy8IbdCxeUA8XGbNZQ60cAanqk1UoiMyGII krKYkypOg0trJ1C7Y3Fbp+reeSQiRcoJyOzpTnu8B2fJVIHCXgNav7dAwjwZK232FdoB AuvEwikMuCWCn0kCyxWN7/DWA0787qOCWONmB1uMm0nSvZiPPK0U8mLgbBSUldu/23wZ A0gw== X-Gm-Message-State: ACrzQf0jMt3F/cPvlxX+U59xabmVtmmpqV0kkT3vcUKxYdDRQqWw2xYe CdVQOdt6j6Y0KCLRk7zl6SPKNQ== X-Google-Smtp-Source: AMsMyM7sd7nW7r8TLcIxYFGjPscr+gxtCfldaTwoKA5c5/+5EqKbQKqNX78BGM2WJsBhPlnk0CTIAA== X-Received: by 2002:adf:f04e:0:b0:236:5d8d:8a1e with SMTP id t14-20020adff04e000000b002365d8d8a1emr19821045wro.392.1666895807917; Thu, 27 Oct 2022 11:36:47 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: fam@euphon.net, berrange@redhat.com, f4bug@amsat.org, aurelien@aurel32.net, pbonzini@redhat.com, stefanha@redhat.com, crosa@redhat.com, Bin Meng , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Kevin Wolf , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Hanna Reitz , qemu-block@nongnu.org (open list:vvfat) Subject: [PATCH v4 13/30] block/vvfat: Unify the mkdir() call Date: Thu, 27 Oct 2022 19:36:19 +0100 Message-Id: <20221027183637.2772968-14-alex.bennee@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221027183637.2772968-1-alex.bennee@linaro.org> References: <20221027183637.2772968-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::435; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x435.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, T_SPF_TEMPERROR=0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Qemu-devel" Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1666896803850100003 From: Bin Meng There is a difference in the mkdir() call for win32 and non-win32 platforms, and currently is handled in the codes with #ifdefs. glib provides a portable g_mkdir() API and we can use it to unify the codes without #ifdefs. Signed-off-by: Bin Meng Reviewed-by: Marc-Andr=C3=A9 Lureau Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Kevin Wolf Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20221006151927.2079583-6-bmeng.cn@gmail.com> --- block/vvfat.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/block/vvfat.c b/block/vvfat.c index d6dd919683..723beef025 100644 --- a/block/vvfat.c +++ b/block/vvfat.c @@ -25,6 +25,7 @@ =20 #include "qemu/osdep.h" #include +#include #include "qapi/error.h" #include "block/block_int.h" #include "block/qdict.h" @@ -2726,13 +2727,9 @@ static int handle_renames_and_mkdirs(BDRVVVFATState*= s) mapping_t* mapping; int j, parent_path_len; =20 -#ifdef __MINGW32__ - if (mkdir(commit->path)) + if (g_mkdir(commit->path, 0755)) { return -5; -#else - if (mkdir(commit->path, 0755)) - return -5; -#endif + } =20 mapping =3D insert_mapping(s, commit->param.mkdir.cluster, commit->param.mkdir.cluster + 1); --=20 2.34.1