From patchwork Fri Nov 8 17:12:14 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Capper X-Patchwork-Id: 21428 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ve0-f198.google.com (mail-ve0-f198.google.com [209.85.128.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 9E84E244F2 for ; Fri, 8 Nov 2013 17:12:30 +0000 (UTC) Received: by mail-ve0-f198.google.com with SMTP id jy13sf3526044veb.5 for ; Fri, 08 Nov 2013 09:12:30 -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=DX+A6fD61WcfRdHx3YV7IrfHU7DFTwxvgGKN3zfO4/c=; b=HbHwzjqyDeuPx9aEL3RTnBa+O5E2lnYnJR9oJLk3jW9Qm9Zn6D2Z33GfFW8epo4XJE 2mhpFvL8usxPR0nrIZ1RtMCxTB8BtpNSbqKoixyXvlVPNELL5W58tuN309qhH73qtN8m rxD92AJz1pVAfsXs49iIcj3du06jnc58oDNDTlXATEeXz6F6Dp8qVxb9/X94mr8pyUaS UMGgL4QfTtSu95eWvJ424EgjB0yV/4ZfMl2bTRzBVgSqdffFyOzFhy3+33M9EIiY+24c BmyV91Yd091PO1JYHIkkJQhyhL90JJ9rieWQfw/sVl2svYVCWV/20s6bS1rzHkk2XZpM Awbg== X-Gm-Message-State: ALoCoQm1Z05Ax0KEg3AjuYvBM48Es+DpVCbXXTCXzZmf/lkLRMqVxNV86vUZ0I+vhwtFLMMFl9LU X-Received: by 10.236.94.205 with SMTP id n53mr3034486yhf.44.1383930750350; Fri, 08 Nov 2013 09:12:30 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.121.1 with SMTP id lg1ls1622277qeb.90.gmail; Fri, 08 Nov 2013 09:12:30 -0800 (PST) X-Received: by 10.220.199.5 with SMTP id eq5mr12948070vcb.16.1383930750238; Fri, 08 Nov 2013 09:12:30 -0800 (PST) Received: from mail-ve0-f173.google.com (mail-ve0-f173.google.com [209.85.128.173]) by mx.google.com with ESMTPS id t2si4400593vem.66.2013.11.08.09.12.30 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 08 Nov 2013 09:12:30 -0800 (PST) Received-SPF: neutral (google.com: 209.85.128.173 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.173; Received: by mail-ve0-f173.google.com with SMTP id c14so1540885vea.18 for ; Fri, 08 Nov 2013 09:12:30 -0800 (PST) X-Received: by 10.220.173.134 with SMTP id p6mr734246vcz.36.1383930750137; Fri, 08 Nov 2013 09:12:30 -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 u4csp45656vcz; Fri, 8 Nov 2013 09:12:29 -0800 (PST) X-Received: by 10.180.188.144 with SMTP id ga16mr3189122wic.42.1383930748726; Fri, 08 Nov 2013 09:12:28 -0800 (PST) Received: from mail-we0-f177.google.com (mail-we0-f177.google.com [74.125.82.177]) by mx.google.com with ESMTPS id hj12si1385717wib.69.2013.11.08.09.12.28 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 08 Nov 2013 09:12:28 -0800 (PST) Received-SPF: neutral (google.com: 74.125.82.177 is neither permitted nor denied by best guess record for domain of steve.capper@linaro.org) client-ip=74.125.82.177; Received: by mail-we0-f177.google.com with SMTP id x55so2225244wes.22 for ; Fri, 08 Nov 2013 09:12:28 -0800 (PST) X-Received: by 10.180.185.179 with SMTP id fd19mr3219178wic.18.1383930748279; Fri, 08 Nov 2013 09:12:28 -0800 (PST) Received: from marmot.wormnet.eu (marmot.wormnet.eu. [188.246.204.87]) by mx.google.com with ESMTPSA id pi6sm7326982wic.3.2013.11.08.09.12.27 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 08 Nov 2013 09:12:27 -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 1/3] syscalls: Fixup some syscalls Date: Fri, 8 Nov 2013 17:12:14 +0000 Message-Id: <1383930736-20005-2-git-send-email-steve.capper@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1383930736-20005-1-git-send-email-steve.capper@linaro.org> References: <1383930736-20005-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.128.173 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, and symlinkat has the first two parameters transposed. Also declarations are missing for utimensat and fchownat. This patch fixes up these syscall declarations. Signed-off-by: Steve Capper --- usr/include/sys/stat.h | 3 ++- usr/include/unistd.h | 7 ++++--- usr/klibc/SYSCALLS.def | 6 +++--- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/usr/include/sys/stat.h b/usr/include/sys/stat.h index 4850429..46f36f5 100644 --- a/usr/include/sys/stat.h +++ b/usr/include/sys/stat.h @@ -69,8 +69,9 @@ __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_inline int mkfifo(const char *__p, mode_t __m) { diff --git a/usr/include/unistd.h b/usr/include/unistd.h index f0e19c2..606eccd 100644 --- a/usr/include/unistd.h +++ b/usr/include/unistd.h @@ -61,7 +61,7 @@ __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 *); @@ -70,19 +70,20 @@ __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..4630d14 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 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);