From patchwork Thu Oct 15 09:03:33 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: 530573 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ozlabs.org (Postfix) with ESMTP id 59B351402B9 for ; Thu, 15 Oct 2015 20:03:51 +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=0/kGJcpc; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id B3FAE8AF9F; Thu, 15 Oct 2015 09:03:48 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id QZkzVVpm+V57; Thu, 15 Oct 2015 09:03:48 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 086B48AF68; Thu, 15 Oct 2015 09:03:48 +0000 (UTC) X-Original-To: uclibc@lists.busybox.net Delivered-To: uclibc@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id C85821CE58D for ; Thu, 15 Oct 2015 09:03:45 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id C14F5320AB for ; Thu, 15 Oct 2015 09:03:45 +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 M6hs93UwxASz for ; Thu, 15 Oct 2015 09:03:44 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wi0-f179.google.com (mail-wi0-f179.google.com [209.85.212.179]) by silver.osuosl.org (Postfix) with ESMTPS id 479F931D48 for ; Thu, 15 Oct 2015 09:03:44 +0000 (UTC) Received: by wicgb1 with SMTP id gb1so18581341wic.1 for ; Thu, 15 Oct 2015 02:03:42 -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=y726G/z9zyQjQmhO5hIb9peKACpb7EcbNvsTssE5nEY=; b=0/kGJcpcnFJOV1PmgwctlYsAC/pEuuJJ3hKZ93EjQKGDatyuvJ1VmIYlPneRJYCyrY FNTsSXfCvmZtodFE27JxX9+kEfvzRo1Z6hiwr6/nuYVlHGdEv13RMnfz6cB0htC5OPen P+0jGRYmeB/dBh+4+M2ZZNmBvegNizhp0eAEAJtTmYTIB+2vi6fbubZlg7HfbcuFVNyh fHtuxqzLBwLsS3p3OXf4201R7sn7AUaIX+oCOQJVKNmoF85Glf3lyaG/jHT6Qq/CoQT8 0XcA6A+iQKAgg3dt5UIDTt9638zM9M9DIs6n6MHMmzJErkhyt45O8EBuwjISDQ6tjZLe iMbA== X-Received: by 10.180.219.106 with SMTP id pn10mr10044793wic.56.1444899822428; Thu, 15 Oct 2015 02:03:42 -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 ht5sm10563997wib.10.2015.10.15.02.03.41 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 15 Oct 2015 02:03:41 -0700 (PDT) From: Bartosz Golaszewski To: uClibc Subject: [PATCH 2/2] syncfs: add system call support Date: Thu, 15 Oct 2015 11:03:33 +0200 Message-Id: <1444899813-24164-3-git-send-email-bartekgola@gmail.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1444899813-24164-1-git-send-email-bartekgola@gmail.com> References: <1444899813-24164-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..831f765 --- /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