From patchwork Tue Jun 8 03:33:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cy Schubert X-Patchwork-Id: 1489095 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=f9ABbJyd; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FzbTB0BH2z9s24 for ; Tue, 8 Jun 2021 13:34:38 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:Reply-To:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:Date:Mime-Version:Subject:To: From:Message-Id:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=HuRzGhBlV7P0HUkT7WxSWwM75lwlx8r1kW7u2PaxWvE=; b=f9ABbJydvsG3jP 0lAZy+y/RqpT/+RsEOaF3OWW1KrtjzHKix52j69MVfJd1mQopJTxAAuv2mGbPLRpIKyVmD5rg481c xlKMmmKNleKNEVMwZsKHJdCWZGQqLlzWk+a2/y0q9Ei8oTXQwznqltxhF8uPrRFLoKBWXxklyM8dS G96LEcDvCHqYW5pWN/eHg3uL4NBIRjXxyXbrNiHlUDR36lZLe8ymGDLzogLrYy6N7powmu+Zz80gr 4Onzt+zwlg7QeApkmSOyxTyjF8PHHz6+n5DgbBGMcEKwovLKqvHY5k2qi0oCVmbgRePcxD06rOxjZ JPBk6KTvED28Ar8BiM2A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lqSUi-006HTg-K4; Tue, 08 Jun 2021 03:33:36 +0000 Received: from smtp-out-no.shaw.ca ([64.59.134.12]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lqSUb-006HSc-85 for hostap@lists.infradead.org; Tue, 08 Jun 2021 03:33:33 +0000 Received: from spqr.komquats.com ([70.66.148.124]) by shaw.ca with ESMTPA id qSUUl76Tdycp5qSUVl5RXx; Mon, 07 Jun 2021 21:33:25 -0600 X-Authority-Analysis: v=2.4 cv=H864f8Ui c=1 sm=1 tr=0 ts=60bee505 a=Cwc3rblV8FOMdVN/wOAqyQ==:117 a=Cwc3rblV8FOMdVN/wOAqyQ==:17 a=kj9zAlcOel0A:10 a=r6YtysWOX24A:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=EkcXrb_YAAAA:8 a=F7Li5Sq9vFEIRK0bTm4A:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=LK5xJRSDVpKd5WXXoEvA:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id C9A2E5C4 for ; Mon, 7 Jun 2021 20:33:20 -0700 (PDT) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.16.1/8.16.1) with ESMTP id 1583XKdU006091 for ; Mon, 7 Jun 2021 20:33:20 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <202106080333.1583XKdU006091@slippy.cwsent.com> X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.7.1 From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: hostap@lists.infradead.org Subject: [PATCH] utils: FreeBSD supports fdatasync(2) Mime-Version: 1.0 Date: Mon, 07 Jun 2021 20:33:20 -0700 X-CMAE-Envelope: MS4xfISSSKXhh4f2FVkkRQsgu+/2IF+e4XQy50uDr/RnbN/DO484Az2f+iLO8oz/nJWt1rExpcGHb7YicQAPL+RVLzcXNIH23EczAKldRGdIUHQYir8Pvo+b gUJUBkB/E7E59Mx0vDizu2Y3iXup7L5Po1O6l8GFD9pnIqfkVkZGAOu2sDAXhLcST/iIKl+H5RTsVsh9pyzk61VAMs0D++erGR4= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210607_203329_350029_BCE81E46 X-CRM114-Status: UNSURE ( 9.08 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.7 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: FreeBSD supports fdatasync(2). Enable it in os_unix.c. Signed-off-by: Cy Schubert --- src/utils/os_unix.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/os_unix.c b/src/utils/os_unix.c index 1de37204d..258deef9d 100644 --- a/src/utils/os_unix.c +++ b/src/utils/os_unix.c @@ -464,9 +464,9 @@ int os_file_exists(const char *fname) i [...] Content analysis details: (-0.7 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [64.59.134.12 listed in list.dnswl.org] 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [64.59.134.12 listed in wl.mailspike.net] 0.0 SPF_NONE SPF: sender does not publish an SPF Record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Cy Schubert Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org FreeBSD supports fdatasync(2). Enable it in os_unix.c. Signed-off-by: Cy Schubert --- src/utils/os_unix.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/os_unix.c b/src/utils/os_unix.c index 1de37204d..258deef9d 100644 --- a/src/utils/os_unix.c +++ b/src/utils/os_unix.c @@ -464,9 +464,9 @@ int os_file_exists(const char *fname) int os_fdatasync(FILE *stream) { if (!fflush(stream)) { -#ifdef __linux__ +#if defined __FreeBSD__ || defined __linux__ return fdatasync(fileno(stream)); -#else /* !__linux__ */ +#else /* !__linux__ && !__FreeBSD__ */ #ifdef F_FULLFSYNC /* OS X does not implement fdatasync(). */ return fcntl(fileno(stream), F_FULLFSYNC);