[LV] [PATCH] VAX: Adjust argument counts of some LFS calls

Maciej W. Rozycki macro at linux-mips.org
Thu Apr 7 18:44:28 CEST 2011


 Fix some of the LFS calls that have their stack argument count set 
incorrectly on VAX:

- pread64(2), pwrite64(2), truncate64(2) and ftruncate64(2) take an 
  argument of the loff_t type that is equivalent to long long (i.e. 
  64-bit) and therefore occupies two stack slots,

- statfs64(2) and fstatfs64(2) take an extra argument (compared to their 
  userland library wrappers) that indicates the size of the buffer passed.

Signed-off-by: Maciej W. Rozycki <macro at linux-mips.org>
---

 Please apply at your earliest convenience.  Thanks.

  Maciej

patch-mips-2.6.18-20060920-vax-lfs-args-1
Index: linux-mips-2.6.18-20060920-cougar/arch/vax/kernel/syscall.c
===================================================================
--- linux-mips-2.6.18-20060920-cougar.orig/arch/vax/kernel/syscall.c
+++ linux-mips-2.6.18-20060920-cougar/arch/vax/kernel/syscall.c
@@ -219,8 +219,8 @@ static struct {
 	SC (__NR_rt_sigtimedwait,	sys_rt_sigtimedwait,		4),
 	SC (__NR_rt_sigqueueinfo,	sys_rt_sigqueueinfo,		3),
 	SC (__NR_rt_sigsuspend,		sys_rt_sigsuspend,		2),
-	SC (__NR_pread64,	sys_pread64,		4),
-	SC (__NR_pwrite64,	sys_pwrite64,		4),
+	SC (__NR_pread64,	sys_pread64,		5),
+	SC (__NR_pwrite64,	sys_pwrite64,		5),
 	SC (__NR_chown,		sys_chown16,		3),
 	SC (__NR_getcwd,	sys_getcwd,		2),
 	SC (__NR_capget,	sys_capget,		2),
@@ -230,8 +230,8 @@ static struct {
 	SC (__NR_vfork,		sys_vfork,		0),
 	SC (__NR_getrlimit,	sys_getrlimit,		2),
 	SC (__NR_mmap2,		sys_mmap2,		6),
-	SC (__NR_truncate64,	sys_truncate64,		2),
-	SC (__NR_ftruncate64,	sys_ftruncate64,	2),
+	SC (__NR_truncate64,	sys_truncate64,		3),
+	SC (__NR_ftruncate64,	sys_ftruncate64,	3),
 	SC (__NR_stat64,	sys_stat64,		2),
 	SC (__NR_lstat64,	sys_lstat64,		2),
 	SC (__NR_fstat64,	sys_fstat64,		2),
@@ -260,8 +260,8 @@ static struct {
 	SC (__NR_getdents64,	sys_getdents64,		3),
 	SC (__NR_fcntl64,	sys_fcntl64,		3),
 	SC (__NR_tkill,		sys_tkill,		3),
-	SC (__NR_statfs64,	sys_statfs64,		2),
-	SC (__NR_fstatfs64,	sys_fstatfs64,		2),
+	SC (__NR_statfs64,	sys_statfs64,		3),
+	SC (__NR_fstatfs64,	sys_fstatfs64,		3),
 	SC (__NR_sendfile64,	sys_sendfile64,		4),
 	SC (__NR_accept,	sys_accept,		3),
 	SC (__NR_bind,		sys_bind,		3),
_______________________________________________
Linux-Vax mailing list
Linux-Vax at mail.pergamentum.com
http://mail.pergamentum.com/mailman/listinfo/linux-vax



More information about the Vax-linux mailing list