qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Aurelien Jarno <aurelien@aurel32.net>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [7187] linux-user: Linux kernel's fchmodat and faccessat have three args ( no 4th arg)
Date: Sun, 19 Apr 2009 08:52:18 +0000	[thread overview]
Message-ID: <E1LvSl8-0003FG-5f@cvs.savannah.gnu.org> (raw)

Revision: 7187
          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=7187
Author:   aurel32
Date:     2009-04-19 08:52:17 +0000 (Sun, 19 Apr 2009)
Log Message:
-----------
linux-user: Linux kernel's fchmodat and faccessat have three args (no 4th arg)

In Linux kernel, fchmodat() and faccessat() take tree args.
4th value <int flags> is only processed by libc.

Signed-off-by: Takashi YOSHII <takasi-y@ops.dti.ne.jp>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

Modified Paths:
--------------
    trunk/linux-user/syscall.c

Modified: trunk/linux-user/syscall.c
===================================================================
--- trunk/linux-user/syscall.c	2009-04-19 00:26:31 UTC (rev 7186)
+++ trunk/linux-user/syscall.c	2009-04-19 08:52:17 UTC (rev 7187)
@@ -303,15 +303,15 @@
  */
 
 #ifdef TARGET_NR_faccessat
-static int sys_faccessat(int dirfd, const char *pathname, int mode, int flags)
+static int sys_faccessat(int dirfd, const char *pathname, int mode)
 {
-  return (faccessat(dirfd, pathname, mode, flags));
+  return (faccessat(dirfd, pathname, mode, 0));
 }
 #endif
 #ifdef TARGET_NR_fchmodat
-static int sys_fchmodat(int dirfd, const char *pathname, mode_t mode, int flags)
+static int sys_fchmodat(int dirfd, const char *pathname, mode_t mode)
 {
-  return (fchmodat(dirfd, pathname, mode, flags));
+  return (fchmodat(dirfd, pathname, mode, 0));
 }
 #endif
 #if defined(TARGET_NR_fchownat) && defined(USE_UID16)
@@ -425,11 +425,10 @@
  * Try direct syscalls instead
  */
 #if defined(TARGET_NR_faccessat) && defined(__NR_faccessat)
-_syscall4(int,sys_faccessat,int,dirfd,const char *,pathname,int,mode,int,flags)
+_syscall3(int,sys_faccessat,int,dirfd,const char *,pathname,int,mode)
 #endif
 #if defined(TARGET_NR_fchmodat) && defined(__NR_fchmodat)
-_syscall4(int,sys_fchmodat,int,dirfd,const char *,pathname,
-          mode_t,mode,int,flags)
+_syscall3(int,sys_fchmodat,int,dirfd,const char *,pathname, mode_t,mode)
 #endif
 #if defined(TARGET_NR_fchownat) && defined(__NR_fchownat) && defined(USE_UID16)
 _syscall5(int,sys_fchownat,int,dirfd,const char *,pathname,
@@ -4218,7 +4217,7 @@
     case TARGET_NR_faccessat:
         if (!(p = lock_user_string(arg2)))
             goto efault;
-        ret = get_errno(sys_faccessat(arg1, p, arg3, arg4));
+        ret = get_errno(sys_faccessat(arg1, p, arg3));
         unlock_user(p, arg2, 0);
         break;
 #endif
@@ -4944,7 +4943,7 @@
     case TARGET_NR_fchmodat:
         if (!(p = lock_user_string(arg2)))
             goto efault;
-        ret = get_errno(sys_fchmodat(arg1, p, arg3, arg4));
+        ret = get_errno(sys_fchmodat(arg1, p, arg3));
         unlock_user(p, arg2, 0);
         break;
 #endif

                 reply	other threads:[~2009-04-19  8:52 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1LvSl8-0003FG-5f@cvs.savannah.gnu.org \
    --to=aurelien@aurel32.net \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).