~ubuntu-branches/ubuntu/vivid/golang/vivid

« back to all changes in this revision

Viewing changes to src/pkg/syscall/syscall_plan9.go

  • Committer: Bazaar Package Importer
  • Author(s): Ondřej Surý
  • Date: 2011-08-03 17:04:59 UTC
  • mfrom: (14.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20110803170459-wzd99m3567y80ila
Tags: 1:59-1
* Imported Upstream version 59
* Refresh patches to a new release
* Fix FTBFS on ARM (Closes: #634270)
* Update version.bash to work with Debian packaging and not hg
  repository

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
        Stdout = 1
36
36
        Stderr = 2
37
37
 
38
 
        EISDIR Error = NewError("file is a directory")
 
38
        EISDIR = NewError("file is a directory")
39
39
)
40
40
 
41
41
func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err string)
200
200
        Msg  string
201
201
}
202
202
 
 
203
func (w Waitmsg) Exited() bool   { return true }
 
204
func (w Waitmsg) Signaled() bool { return false }
 
205
 
 
206
func (w Waitmsg) ExitStatus() int {
 
207
        if len(w.Msg) == 0 {
 
208
                // a normal exit returns no message
 
209
                return 0
 
210
        }
 
211
        return 1
 
212
}
 
213
 
203
214
//sys   await(s []byte) (n int, err Error)
204
215
func Await(w *Waitmsg) (err Error) {
205
216
        var buf [512]byte
230
241
        w.Time[0] = uint32(atoi(f[1]))
231
242
        w.Time[1] = uint32(atoi(f[2]))
232
243
        w.Time[2] = uint32(atoi(f[3]))
233
 
        w.Msg = string(f[4])
 
244
        w.Msg = cstring(f[4])
234
245
        return
235
246
}
236
247
 
327
338
        return make([]int, 0), nil
328
339
}
329
340
 
330
 
// TODO
331
 
func Sendfile(outfd int, infd int, offset *int64, count int) (written int, errno int) {
332
 
        return -1, ENOSYS
333
 
}
334
 
 
335
341
//sys   Dup(oldfd int, newfd int) (fd int, err Error)
336
342
//sys   Open(path string, mode int) (fd int, err Error)
337
343
//sys   Create(path string, mode int, perm uint32) (fd int, err Error)