arm: use the correct stat syscalls

We were using the 64-bit struct with the old 32-bit
system calls.

http://code.google.com/p/go/issues/detail?id=1083

This also fixes up mksyscall.sh to generate
gofmt-compliant code.

R=rsc
CC=golang-dev, kaib
https://golang.org/cl/2148042
This commit is contained in:
Brad Fitzpatrick 2010-09-07 09:23:49 -04:00 committed by Russ Cox
parent 832ed355fe
commit 34c312e11e
3 changed files with 23 additions and 20 deletions

View file

@ -680,13 +680,13 @@ func Fchown(fd int, uid int, gid int) (errno int) {
}
func Fstat(fd int, stat *Stat_t) (errno int) {
_, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
_, _, e1 := Syscall(SYS_FSTAT64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
errno = int(e1)
return
}
func Fstatfs(fd int, buf *Statfs_t) (errno int) {
_, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(buf)), 0)
_, _, e1 := Syscall(SYS_FSTATFS64, uintptr(fd), uintptr(unsafe.Pointer(buf)), 0)
errno = int(e1)
return
}
@ -728,7 +728,7 @@ func Listen(s int, n int) (errno int) {
}
func Lstat(path string, stat *Stat_t) (errno int) {
_, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(unsafe.Pointer(stat)), 0)
_, _, e1 := Syscall(SYS_LSTAT64, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(unsafe.Pointer(stat)), 0)
errno = int(e1)
return
}
@ -796,13 +796,13 @@ func Shutdown(fd int, how int) (errno int) {
}
func Stat(path string, stat *Stat_t) (errno int) {
_, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(unsafe.Pointer(stat)), 0)
_, _, e1 := Syscall(SYS_STAT64, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(unsafe.Pointer(stat)), 0)
errno = int(e1)
return
}
func Statfs(path string, buf *Statfs_t) (errno int) {
_, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(unsafe.Pointer(buf)), 0)
_, _, e1 := Syscall(SYS_STATFS64, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(unsafe.Pointer(buf)), 0)
errno = int(e1)
return
}