From patchwork Wed Oct 21 08:35:08 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: 533659 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 66EE714076E for ; Wed, 21 Oct 2015 19:35:26 +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=gUxVdM2v; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 2F6CE331F1; Wed, 21 Oct 2015 08:35:25 +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 p40Sy6YOGd7p; Wed, 21 Oct 2015 08:35:23 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id D00E63317C; Wed, 21 Oct 2015 08:35:22 +0000 (UTC) X-Original-To: uclibc@lists.busybox.net Delivered-To: uclibc@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id E37781C44BF for ; Wed, 21 Oct 2015 08:35:20 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id DF7D188301 for ; Wed, 21 Oct 2015 08:35:20 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id gK-LbZyoOK0I for ; Wed, 21 Oct 2015 08:35:20 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wi0-f176.google.com (mail-wi0-f176.google.com [209.85.212.176]) by whitealder.osuosl.org (Postfix) with ESMTPS id 2AAD48D369 for ; Wed, 21 Oct 2015 08:35:20 +0000 (UTC) Received: by wicfx6 with SMTP id fx6so80100836wic.1 for ; Wed, 21 Oct 2015 01:35:18 -0700 (PDT) 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=owzHWTzZM3+ADIbdVkLb/NUjCdOF+PQErMBu23PWLSQ=; b=gUxVdM2vWyFWtnu859oZYCNSCKAIaT9S/H32LokTZbIxtPpu0qB65wacAe9gwMTbfQ SvA/noRhHvGXbwbRDMJbwxcj6TKjp0zz4qI/RHdj1IstXTMyaB/62MzsjkisfhdcV/sw WFDlORfDj4TdmEH+yy52YHKy7NGzMd5LXCtzvW6NHDZkVgJ5JhP7nv5bb3FwKxfQm1nw 3KIDbI4Gnd4otaGP2RP4OjWIlIV7TwKfCBhzcrrwQqN8LXu3EVt79umufR9x2YTGGwZd dzxgoMR5eZGLUf6tsXE08AkRIw9SPHjyVtksZFfF1GStmmKyY7Y01CndGqKyXYkyf0AN WxqA== X-Received: by 10.180.87.106 with SMTP id w10mr3281248wiz.87.1445416518715; Wed, 21 Oct 2015 01:35:18 -0700 (PDT) Received: from localhost.localdomain (cag06-6-78-235-100-105.fbx.proxad.net. [78.235.100.105]) by smtp.gmail.com with ESMTPSA id lf10sm8873888wjb.23.2015.10.21.01.35.17 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 21 Oct 2015 01:35:18 -0700 (PDT) From: Bartosz Golaszewski To: uClibc Subject: [PATCH v2 2/2] syncfs: add system call support Date: Wed, 21 Oct 2015 10:35:08 +0200 Message-Id: <1445416508-31622-3-git-send-email-bartekgola@gmail.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1445416508-31622-1-git-send-email-bartekgola@gmail.com> References: <1445416508-31622-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..4701dab 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 */ +#if __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