Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
Commits
189d4ff7
Commit
189d4ff7
authored
Jan 05, 2011
by
Russ Cox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
syscall: correct Linux Splice definition
Fixes #1376. R=r CC=golang-dev
https://golang.org/cl/3869042
parent
ddc2710d
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
35 additions
and
33 deletions
+35
-33
syscall_linux.go
src/pkg/syscall/syscall_linux.go
+0
-1
syscall_linux_386.go
src/pkg/syscall/syscall_linux_386.go
+1
-0
syscall_linux_amd64.go
src/pkg/syscall/syscall_linux_amd64.go
+1
-0
syscall_linux_arm.go
src/pkg/syscall/syscall_linux_arm.go
+1
-0
zsyscall_linux_386.go
src/pkg/syscall/zsyscall_linux_386.go
+9
-9
zsyscall_linux_amd64.go
src/pkg/syscall/zsyscall_linux_amd64.go
+9
-9
zsyscall_linux_arm.go
src/pkg/syscall/zsyscall_linux_arm.go
+14
-14
No files found.
src/pkg/syscall/syscall_linux.go
View file @
189d4ff7
...
...
@@ -721,7 +721,6 @@ func PtraceDetach(pid int) (errno int) { return ptrace(PTRACE_DETACH, pid, 0, 0)
//sys Setsid() (pid int, errno int)
//sys Settimeofday(tv *Timeval) (errno int)
//sys Setuid(uid int) (errno int)
//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, errno int)
//sys Symlink(oldpath string, newpath string) (errno int)
//sys Sync()
//sys Sysinfo(info *Sysinfo_t) (errno int)
...
...
src/pkg/syscall/syscall_linux_386.go
View file @
189d4ff7
...
...
@@ -48,6 +48,7 @@ func NsecToTimeval(nsec int64) (tv Timeval) {
//sys Setresgid(rgid int, egid int, sgid int) (errno int) = SYS_SETRESGID32
//sys Setresuid(ruid int, euid int, suid int) (errno int) = SYS_SETRESUID32
//sys Setreuid(ruid int, euid int) (errno int) = SYS_SETREUID32
//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, errno int)
//sys Stat(path string, stat *Stat_t) (errno int) = SYS_STAT64
//sys SyncFileRange(fd int, off int64, n int64, flags int) (errno int)
//sys Truncate(path string, length int64) (errno int) = SYS_TRUNCATE64
...
...
src/pkg/syscall/syscall_linux_amd64.go
View file @
189d4ff7
...
...
@@ -30,6 +30,7 @@ package syscall
//sys Setresuid(ruid int, euid int, suid int) (errno int)
//sys Setreuid(ruid int, euid int) (errno int)
//sys Shutdown(fd int, how int) (errno int)
//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, errno int)
//sys Stat(path string, stat *Stat_t) (errno int)
//sys Statfs(path string, buf *Statfs_t) (errno int)
//sys SyncFileRange(fd int, off int64, n int64, flags int) (errno int)
...
...
src/pkg/syscall/syscall_linux_arm.go
View file @
189d4ff7
...
...
@@ -88,6 +88,7 @@ func Seek(fd int, offset int64, whence int) (newoffset int64, errno int)
//sys Setresuid(ruid int, euid int, suid int) (errno int)
//sys Setreuid(ruid int, euid int) (errno int)
//sys Shutdown(fd int, how int) (errno int)
//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, errno int)
//sys Stat(path string, stat *Stat_t) (errno int) = SYS_STAT64
//sys Statfs(path string, buf *Statfs_t) (errno int) = SYS_STATFS64
//sys Truncate(path string, length int64) (errno int) = SYS_TRUNCATE64
...
...
src/pkg/syscall/zsyscall_linux_386.go
View file @
189d4ff7
...
...
@@ -579,15 +579,6 @@ func Setuid(uid int) (errno int) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func
Splice
(
rfd
int
,
roff
*
int64
,
wfd
int
,
woff
*
int64
,
len
int
,
flags
int
)
(
n
int64
,
errno
int
)
{
r0
,
r1
,
e1
:=
Syscall6
(
SYS_SPLICE
,
uintptr
(
rfd
),
uintptr
(
unsafe
.
Pointer
(
roff
)),
uintptr
(
wfd
),
uintptr
(
unsafe
.
Pointer
(
woff
)),
uintptr
(
len
),
uintptr
(
flags
))
n
=
int64
(
int64
(
r1
)
<<
32
|
int64
(
r0
))
errno
=
int
(
e1
)
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func
Symlink
(
oldpath
string
,
newpath
string
)
(
errno
int
)
{
_
,
_
,
e1
:=
Syscall
(
SYS_SYMLINK
,
uintptr
(
unsafe
.
Pointer
(
StringBytePtr
(
oldpath
))),
uintptr
(
unsafe
.
Pointer
(
StringBytePtr
(
newpath
))),
0
)
errno
=
int
(
e1
)
...
...
@@ -910,6 +901,15 @@ func Setreuid(ruid int, euid int) (errno int) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func
Splice
(
rfd
int
,
roff
*
int64
,
wfd
int
,
woff
*
int64
,
len
int
,
flags
int
)
(
n
int
,
errno
int
)
{
r0
,
_
,
e1
:=
Syscall6
(
SYS_SPLICE
,
uintptr
(
rfd
),
uintptr
(
unsafe
.
Pointer
(
roff
)),
uintptr
(
wfd
),
uintptr
(
unsafe
.
Pointer
(
woff
)),
uintptr
(
len
),
uintptr
(
flags
))
n
=
int
(
r0
)
errno
=
int
(
e1
)
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func
Stat
(
path
string
,
stat
*
Stat_t
)
(
errno
int
)
{
_
,
_
,
e1
:=
Syscall
(
SYS_STAT64
,
uintptr
(
unsafe
.
Pointer
(
StringBytePtr
(
path
))),
uintptr
(
unsafe
.
Pointer
(
stat
)),
0
)
errno
=
int
(
e1
)
...
...
src/pkg/syscall/zsyscall_linux_amd64.go
View file @
189d4ff7
...
...
@@ -579,15 +579,6 @@ func Setuid(uid int) (errno int) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func
Splice
(
rfd
int
,
roff
*
int64
,
wfd
int
,
woff
*
int64
,
len
int
,
flags
int
)
(
n
int64
,
errno
int
)
{
r0
,
_
,
e1
:=
Syscall6
(
SYS_SPLICE
,
uintptr
(
rfd
),
uintptr
(
unsafe
.
Pointer
(
roff
)),
uintptr
(
wfd
),
uintptr
(
unsafe
.
Pointer
(
woff
)),
uintptr
(
len
),
uintptr
(
flags
))
n
=
int64
(
r0
)
errno
=
int
(
e1
)
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func
Symlink
(
oldpath
string
,
newpath
string
)
(
errno
int
)
{
_
,
_
,
e1
:=
Syscall
(
SYS_SYMLINK
,
uintptr
(
unsafe
.
Pointer
(
StringBytePtr
(
oldpath
))),
uintptr
(
unsafe
.
Pointer
(
StringBytePtr
(
newpath
))),
0
)
errno
=
int
(
e1
)
...
...
@@ -952,6 +943,15 @@ func Shutdown(fd int, how int) (errno int) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func
Splice
(
rfd
int
,
roff
*
int64
,
wfd
int
,
woff
*
int64
,
len
int
,
flags
int
)
(
n
int64
,
errno
int
)
{
r0
,
_
,
e1
:=
Syscall6
(
SYS_SPLICE
,
uintptr
(
rfd
),
uintptr
(
unsafe
.
Pointer
(
roff
)),
uintptr
(
wfd
),
uintptr
(
unsafe
.
Pointer
(
woff
)),
uintptr
(
len
),
uintptr
(
flags
))
n
=
int64
(
r0
)
errno
=
int
(
e1
)
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func
Stat
(
path
string
,
stat
*
Stat_t
)
(
errno
int
)
{
_
,
_
,
e1
:=
Syscall
(
SYS_STAT
,
uintptr
(
unsafe
.
Pointer
(
StringBytePtr
(
path
))),
uintptr
(
unsafe
.
Pointer
(
stat
)),
0
)
errno
=
int
(
e1
)
...
...
src/pkg/syscall/zsyscall_linux_arm.go
View file @
189d4ff7
// mksyscall.sh -
b
32 syscall_linux.go syscall_linux_arm.go
// mksyscall.sh -
l
32 syscall_linux.go syscall_linux_arm.go
// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
package
syscall
...
...
@@ -209,7 +209,7 @@ func Faccessat(dirfd int, path string, mode uint32, flags int) (errno int) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func
Fallocate
(
fd
int
,
mode
uint32
,
off
int64
,
len
int64
)
(
errno
int
)
{
_
,
_
,
e1
:=
Syscall6
(
SYS_FALLOCATE
,
uintptr
(
fd
),
uintptr
(
mode
),
uintptr
(
off
>>
32
),
uintptr
(
off
),
uintptr
(
len
>>
32
),
uintptr
(
len
))
_
,
_
,
e1
:=
Syscall6
(
SYS_FALLOCATE
,
uintptr
(
fd
),
uintptr
(
mode
),
uintptr
(
off
),
uintptr
(
off
>>
32
),
uintptr
(
len
),
uintptr
(
len
>>
32
))
errno
=
int
(
e1
)
return
}
...
...
@@ -579,15 +579,6 @@ func Setuid(uid int) (errno int) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func
Splice
(
rfd
int
,
roff
*
int64
,
wfd
int
,
woff
*
int64
,
len
int
,
flags
int
)
(
n
int64
,
errno
int
)
{
r0
,
r1
,
e1
:=
Syscall6
(
SYS_SPLICE
,
uintptr
(
rfd
),
uintptr
(
unsafe
.
Pointer
(
roff
)),
uintptr
(
wfd
),
uintptr
(
unsafe
.
Pointer
(
woff
)),
uintptr
(
len
),
uintptr
(
flags
))
n
=
int64
(
int64
(
r0
)
<<
32
|
int64
(
r1
))
errno
=
int
(
e1
)
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func
Symlink
(
oldpath
string
,
newpath
string
)
(
errno
int
)
{
_
,
_
,
e1
:=
Syscall
(
SYS_SYMLINK
,
uintptr
(
unsafe
.
Pointer
(
StringBytePtr
(
oldpath
))),
uintptr
(
unsafe
.
Pointer
(
StringBytePtr
(
newpath
))),
0
)
errno
=
int
(
e1
)
...
...
@@ -613,7 +604,7 @@ func Sysinfo(info *Sysinfo_t) (errno int) {
func
Tee
(
rfd
int
,
wfd
int
,
len
int
,
flags
int
)
(
n
int64
,
errno
int
)
{
r0
,
r1
,
e1
:=
Syscall6
(
SYS_TEE
,
uintptr
(
rfd
),
uintptr
(
wfd
),
uintptr
(
len
),
uintptr
(
flags
),
0
,
0
)
n
=
int64
(
int64
(
r
0
)
<<
32
|
int64
(
r1
))
n
=
int64
(
int64
(
r
1
)
<<
32
|
int64
(
r0
))
errno
=
int
(
e1
)
return
}
...
...
@@ -890,7 +881,7 @@ func Fstatfs(fd int, buf *Statfs_t) (errno int) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func
Ftruncate
(
fd
int
,
length
int64
)
(
errno
int
)
{
_
,
_
,
e1
:=
Syscall
(
SYS_FTRUNCATE64
,
uintptr
(
fd
),
uintptr
(
length
>>
32
),
uintptr
(
length
))
_
,
_
,
e1
:=
Syscall
(
SYS_FTRUNCATE64
,
uintptr
(
fd
),
uintptr
(
length
),
uintptr
(
length
>>
32
))
errno
=
int
(
e1
)
return
}
...
...
@@ -1026,6 +1017,15 @@ func Shutdown(fd int, how int) (errno int) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func
Splice
(
rfd
int
,
roff
*
int64
,
wfd
int
,
woff
*
int64
,
len
int
,
flags
int
)
(
n
int
,
errno
int
)
{
r0
,
_
,
e1
:=
Syscall6
(
SYS_SPLICE
,
uintptr
(
rfd
),
uintptr
(
unsafe
.
Pointer
(
roff
)),
uintptr
(
wfd
),
uintptr
(
unsafe
.
Pointer
(
woff
)),
uintptr
(
len
),
uintptr
(
flags
))
n
=
int
(
r0
)
errno
=
int
(
e1
)
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func
Stat
(
path
string
,
stat
*
Stat_t
)
(
errno
int
)
{
_
,
_
,
e1
:=
Syscall
(
SYS_STAT64
,
uintptr
(
unsafe
.
Pointer
(
StringBytePtr
(
path
))),
uintptr
(
unsafe
.
Pointer
(
stat
)),
0
)
errno
=
int
(
e1
)
...
...
@@ -1043,7 +1043,7 @@ func Statfs(path string, buf *Statfs_t) (errno int) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func
Truncate
(
path
string
,
length
int64
)
(
errno
int
)
{
_
,
_
,
e1
:=
Syscall
(
SYS_TRUNCATE64
,
uintptr
(
unsafe
.
Pointer
(
StringBytePtr
(
path
))),
uintptr
(
length
>>
32
),
uintptr
(
length
))
_
,
_
,
e1
:=
Syscall
(
SYS_TRUNCATE64
,
uintptr
(
unsafe
.
Pointer
(
StringBytePtr
(
path
))),
uintptr
(
length
),
uintptr
(
length
>>
32
))
errno
=
int
(
e1
)
return
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment