From patchwork Tue Nov 3 15:20:57 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Bartosz_Go=C5=82aszewski?= X-Patchwork-Id: 539467 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ozlabs.org (Postfix) with ESMTP id BF2CB1402D6 for ; Wed, 4 Nov 2015 02:21:21 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=Oz2yrBDA; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id E1C3D32A47; Tue, 3 Nov 2015 15:21:20 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Z3AwGcnhW6bc; Tue, 3 Nov 2015 15:21:17 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 7C94432ABD; Tue, 3 Nov 2015 15:21:17 +0000 (UTC) X-Original-To: uclibc@lists.busybox.net Delivered-To: uclibc@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 3B5911C1017 for ; Tue, 3 Nov 2015 15:21:13 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 374F887AEF for ; Tue, 3 Nov 2015 15:21:13 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id bvzl8wtoICrp for ; Tue, 3 Nov 2015 15:21:12 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm0-f48.google.com (mail-wm0-f48.google.com [74.125.82.48]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 288A486CE7 for ; Tue, 3 Nov 2015 15:21:12 +0000 (UTC) Received: by wmff134 with SMTP id f134so87048129wmf.1 for ; Tue, 03 Nov 2015 07:21:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=klo8j4NiCGk0XvbxDuLupkhc2kMkwFZcZO72XoKUaF4=; b=Oz2yrBDAfgrQeUVV8Gt0FiRuDNVlcx7GVoqOuNWttdn73EadR/sx7/v4kNBEyP4puz ybrerOSWLcxviXDry70dsPPs0QZRDJX1USB2ySN6vDn04ma/K+Wngkdc7wivOWN0rLMX H2RB4wzw9RkKq04+eApUvFc28H+rOq+75R9nZuEfKc6jPcwhxp53UBMCL+ndEICyHVyh BNB1iDgb8oEjOMBYBADXPRg58/RxjQN/0p/v4vs6JUcwCre0go8mk3/4iMQCYrOyChi+ weMQ9p1+jLQMA3yVcAUyJ0xISzM1th8B29mNc8VRhn0xZWtsyBwB+5TArQCraR3LJD4i KM+Q== X-Received: by 10.28.87.15 with SMTP id l15mr21369431wmb.66.1446564070645; Tue, 03 Nov 2015 07:21:10 -0800 (PST) Received: from localhost.localdomain (cag06-6-78-235-100-105.fbx.proxad.net. [78.235.100.105]) by smtp.gmail.com with ESMTPSA id gl9sm28097485wjb.10.2015.11.03.07.21.09 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 03 Nov 2015 07:21:10 -0800 (PST) From: Bartosz Golaszewski To: uClibc Subject: [PATCH v3 2/2] syncfs: add system call support Date: Tue, 3 Nov 2015 16:20:57 +0100 Message-Id: <1446564057-6339-3-git-send-email-bartekgola@gmail.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1446564057-6339-1-git-send-email-bartekgola@gmail.com> References: <1446564057-6339-1-git-send-email-bartekgola@gmail.com> X-BeenThere: uclibc@uclibc.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "Discussion and development of uClibc \(the embedded C library\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: uclibc-bounces@uclibc.org Sender: "uClibc" Add support for the syncfs() system call. Signed-off-by: Bartosz Golaszewski --- include/unistd.h | 2 +- libc/sysdeps/linux/common/syncfs.c | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 libc/sysdeps/linux/common/syncfs.c diff --git a/include/unistd.h b/include/unistd.h index 3793d2d..d01bb08 100644 --- a/include/unistd.h +++ b/include/unistd.h @@ -1073,7 +1073,7 @@ extern char *getpass (const char *__prompt) __nonnull ((1)); extern int fsync (int __fd); #endif /* Use BSD || X/Open || Unix98. */ -#if 0 /*def __USE_GNU */ +#ifdef __USE_GNU /* Make all changes done to all files on the file system associated * with FD actually appear on disk. */ extern int syncfs (int __fd) __THROW; diff --git a/libc/sysdeps/linux/common/syncfs.c b/libc/sysdeps/linux/common/syncfs.c new file mode 100644 index 0000000..30e2c2f --- /dev/null +++ b/libc/sysdeps/linux/common/syncfs.c @@ -0,0 +1,13 @@ +/* vi: set sw=4 ts=4: */ +/* + * Copyright (C) 2015 Bartosz Golaszewski + * + * Licensed under the LGPL v2.1+, see the file COPYING.LIB in this tarball. + */ + +#include + +#if defined(__NR_syncfs) && __USE_GNU +#include +_syscall1(int, syncfs, int, fd) +#endif