From patchwork Mon Nov 11 17:04:10 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Capper X-Patchwork-Id: 21446 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yh0-f70.google.com (mail-yh0-f70.google.com [209.85.213.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 85A6823FBA for ; Mon, 11 Nov 2013 17:04:23 +0000 (UTC) Received: by mail-yh0-f70.google.com with SMTP id a41sf8242063yho.5 for ; Mon, 11 Nov 2013 09:04:23 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=Iw8tdwT8yheTO/qM+7ZGDkH0xbjMrqlxhYmnBsqrbUQ=; b=D7HM/MYd8ODKzj06FjL7zV0Auc0/hKMrtoYO1POthOJSzJRIQtYx5ZWd5peyyDNXwM zwu/u8+zMPrvgjOkx8CjeWnIrUIs2PkSFhI3c/T8E1kO9RROwFBgeoIUOmdpnUaU8adm CcOgqUuJIipgwYZQe4lJCzzxcQzp8RFLMPdRov9dABvQmdcOYh0XzyQGJkTMYycM+rw+ hloWrFVZ9vFMSopb05XR0MWnlC0dZiqma2Kk4wtGJRgm9E4K627S8oWWUCpFvhcDezwM lngx0Bs7ntmGaqwJHTsW9hTffu3JLw6phBCPDX3IGREgquZ2ghWnejLSYC4A/FgZ7FXp AYFQ== X-Gm-Message-State: ALoCoQmUt5HfbHrOIsmPWz2seCksK919cO0fUTUcsxuotoQjEz7JOBVV3+N5sIgPu96bNc2eSVDO X-Received: by 10.58.201.36 with SMTP id jx4mr3830177vec.35.1384189463241; Mon, 11 Nov 2013 09:04:23 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.96.101 with SMTP id dr5ls2530581qeb.80.gmail; Mon, 11 Nov 2013 09:04:23 -0800 (PST) X-Received: by 10.58.238.9 with SMTP id vg9mr82949vec.43.1384189463142; Mon, 11 Nov 2013 09:04:23 -0800 (PST) Received: from mail-vc0-f174.google.com (mail-vc0-f174.google.com [209.85.220.174]) by mx.google.com with ESMTPS id g6si6772503vdw.80.2013.11.11.09.04.23 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 11 Nov 2013 09:04:23 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.174 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.174; Received: by mail-vc0-f174.google.com with SMTP id ld13so3430282vcb.33 for ; Mon, 11 Nov 2013 09:04:23 -0800 (PST) X-Received: by 10.58.136.231 with SMTP id qd7mr24519185veb.1.1384189463038; Mon, 11 Nov 2013 09:04:23 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp104302vcz; Mon, 11 Nov 2013 09:04:22 -0800 (PST) X-Received: by 10.180.183.11 with SMTP id ei11mr5439796wic.10.1384189462018; Mon, 11 Nov 2013 09:04:22 -0800 (PST) Received: from mail-wi0-f171.google.com (mail-wi0-f171.google.com [209.85.212.171]) by mx.google.com with ESMTPS id gh6si6137391wic.41.2013.11.11.09.04.21 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 11 Nov 2013 09:04:21 -0800 (PST) Received-SPF: neutral (google.com: 209.85.212.171 is neither permitted nor denied by best guess record for domain of steve.capper@linaro.org) client-ip=209.85.212.171; Received: by mail-wi0-f171.google.com with SMTP id hn9so2464303wib.16 for ; Mon, 11 Nov 2013 09:04:21 -0800 (PST) X-Received: by 10.195.13.164 with SMTP id ez4mr23631387wjd.11.1384189461390; Mon, 11 Nov 2013 09:04:21 -0800 (PST) Received: from marmot.wormnet.eu (marmot.wormnet.eu. [188.246.204.87]) by mx.google.com with ESMTPSA id dj8sm35959163wid.2.2013.11.11.09.04.20 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Nov 2013 09:04:20 -0800 (PST) From: Steve Capper To: klibc@zytor.com Cc: hpa@zytor.com, anil.singhar@linaro.org, steve.mcintyre@linaro.org, codehelp@debian.org, wookey@wookware.org, patches@linaro.org, Steve Capper Subject: [PATCH V2 1/3] syscalls: Fixup some syscalls Date: Mon, 11 Nov 2013 17:04:10 +0000 Message-Id: <1384189452-9697-2-git-send-email-steve.capper@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1384189452-9697-1-git-send-email-steve.capper@linaro.org> References: <1384189452-9697-1-git-send-email-steve.capper@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: steve.capper@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.174 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , mknodat and mkdirat contain a spurious repeated parameter, linkat is missing the final int flags parameter, symlinkat has the first two parameters transposed, and fchmodat is missing the flags parameter and is declared in the wrong header. Also declarations are missing for utimensat and fchownat. This patch fixes up these syscall declarations. Originally-by: Neil Williams Originally-by: Anil Singhar Signed-off-by: Steve Capper --- Added in V2: fchmodat fixed now too. --- usr/include/sys/stat.h | 4 +++- usr/include/unistd.h | 8 ++++---- usr/klibc/SYSCALLS.def | 8 ++++---- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/usr/include/sys/stat.h b/usr/include/sys/stat.h index 4850429..c4b378e 100644 --- a/usr/include/sys/stat.h +++ b/usr/include/sys/stat.h @@ -69,8 +69,10 @@ __extern int fstatat(int, const char *, struct stat *, int); __extern int lstat(const char *, struct stat *); __extern mode_t umask(mode_t); __extern int mknod(const char *, mode_t, dev_t); -__extern int mknodat(int, const char *, const char *, mode_t, dev_t); +__extern int mknodat(int, const char *, mode_t, dev_t); __extern int mkfifo(const char *, mode_t); +__extern int utimensat(int, const char *, const struct timespec *, int); +__extern int fchmodat(int, const char *, mode_t, int); __extern_inline int mkfifo(const char *__p, mode_t __m) { diff --git a/usr/include/unistd.h b/usr/include/unistd.h index f0e19c2..6c08d4e 100644 --- a/usr/include/unistd.h +++ b/usr/include/unistd.h @@ -61,28 +61,28 @@ __extern int setfsuid(uid_t); __extern int access(const char *, int); __extern int faccessat(int, const char *, int, int); __extern int link(const char *, const char *); -__extern int linkat(int, const char *, int, const char *); +__extern int linkat(int, const char *, int, const char *, int); __extern int unlink(const char *); __extern int unlinkat(int, const char *, int); __extern int chdir(const char *); __extern int fchdir(int); __extern int chmod(const char *, mode_t); __extern int fchmod(int, mode_t); -__extern int fchmodat(int, const char *, mode_t); __extern int mkdir(const char *, mode_t); -__extern int mkdirat(int, const char *, const char *, mode_t); +__extern int mkdirat(int, const char *, mode_t); __extern int rmdir(const char *); __extern int pipe(int *); __extern int pipe2(int *, int); __extern int chroot(const char *); __extern int symlink(const char *, const char *); -__extern int symlinkat(int, const char *, const char *); +__extern int symlinkat(const char *, int, const char *); __extern int readlink(const char *, char *, size_t); __extern int readlinkat(int, const char *, char *, size_t); __extern int chown(const char *, uid_t, gid_t); __extern int fchown(int, uid_t, gid_t); __extern int lchown(const char *, uid_t, gid_t); __extern char *getcwd(char *, size_t); +__extern int fchownat(int, const char *, uid_t, gid_t, int); /* Also in */ #ifndef _KLIBC_IN_OPEN_C diff --git a/usr/klibc/SYSCALLS.def b/usr/klibc/SYSCALLS.def index 9b07aa2..55d8e36 100644 --- a/usr/klibc/SYSCALLS.def +++ b/usr/klibc/SYSCALLS.def @@ -109,7 +109,7 @@ int swapoff(const char *); int access(const char *, int); int faccessat(int, const char *, int, int); int link(const char *, const char *); - int linkat(int, const char *, int, const char *); + int linkat(int, const char *, int, const char *, int); int unlink(const char *); int unlinkat(int, const char *, int); int chdir(const char *); @@ -117,12 +117,12 @@ int fchdir(int); int rename(const char *, const char *); int renameat(int, const char *, int, const char *); int mknod(const char *, mode_t, dev_t); - int mknodat(int, const char *, const char *, mode_t, dev_t); + int mknodat(int, const char *, mode_t, dev_t); int chmod(const char *, mode_t); int fchmod(int, mode_t); - int fchmodat(int, const char *, mode_t); + int fchmodat(int, const char *, mode_t, int); int mkdir(const char *, mode_t); - int mkdirat(int, const char *, const char *, mode_t); + int mkdirat(int, const char *, mode_t); int rmdir(const char *); int pipe(int *); int pipe2(int *, int);