diff options
author | Russ Cox <rsc@golang.org> | 2009-04-07 00:40:36 -0700 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2009-04-07 00:40:36 -0700 |
commit | 6c253b793cb2d0014f6c3e693347484310fdee66 (patch) | |
tree | 246bc3103ef62bf35482becc15a2fa104255c52a /src/lib/syscall/file_linux.go | |
parent | 97d4a4b92004136da40eab5d99bad180ae2fdb50 (diff) | |
download | golang-6c253b793cb2d0014f6c3e693347484310fdee66.tar.gz |
Chdir
R=r
DELTA=17 (17 added, 0 deleted, 0 changed)
OCL=27146
CL=27153
Diffstat (limited to 'src/lib/syscall/file_linux.go')
-rw-r--r-- | src/lib/syscall/file_linux.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/lib/syscall/file_linux.go b/src/lib/syscall/file_linux.go index ceb0a85d7..9bf440884 100644 --- a/src/lib/syscall/file_linux.go +++ b/src/lib/syscall/file_linux.go @@ -100,3 +100,8 @@ func Getdents(fd int64, buf *Dirent, nbytes int64) (ret int64, errno int64) { return r1, err; } +func Chdir(dir string) (ret int64, errno int64) { + namebuf := StringBytePtr(dir); + r1, r2, err := Syscall(SYS_CHDIR, int64(uintptr(unsafe.Pointer(namebuf))), 0, 0); + return r1, err; +} |