Source file src/syscall/errors_plan9.go

     1  // Copyright 2011 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  package syscall
     6  
     7  // Constants
     8  const (
     9  	// Invented values to support what package os expects.
    10  	O_CREAT    = 0x02000
    11  	O_APPEND   = 0x00400
    12  	O_NOCTTY   = 0x00000
    13  	O_NONBLOCK = 0x00000
    14  	O_SYNC     = 0x00000
    15  	O_ASYNC    = 0x00000
    16  
    17  	S_IFMT   = 0x1f000
    18  	S_IFIFO  = 0x1000
    19  	S_IFCHR  = 0x2000
    20  	S_IFDIR  = 0x4000
    21  	S_IFBLK  = 0x6000
    22  	S_IFREG  = 0x8000
    23  	S_IFLNK  = 0xa000
    24  	S_IFSOCK = 0xc000
    25  )
    26  
    27  // Errors
    28  var (
    29  	EINVAL       = NewError("bad arg in system call")
    30  	ENOTDIR      = NewError("not a directory")
    31  	EISDIR       = NewError("file is a directory")
    32  	ENOENT       = NewError("file does not exist")
    33  	EEXIST       = NewError("file already exists")
    34  	EMFILE       = NewError("no free file descriptors")
    35  	EIO          = NewError("i/o error")
    36  	ENAMETOOLONG = NewError("file name too long")
    37  	EINTR        = NewError("interrupted")
    38  	EPERM        = NewError("permission denied")
    39  	EBUSY        = NewError("no free devices")
    40  	ETIMEDOUT    = NewError("connection timed out")
    41  	EPLAN9       = NewError("not supported by plan 9")
    42  
    43  	// The following errors do not correspond to any
    44  	// Plan 9 system messages. Invented to support
    45  	// what package os and others expect.
    46  	EACCES       = NewError("access permission denied")
    47  	EAFNOSUPPORT = NewError("address family not supported by protocol")
    48  	ESPIPE       = NewError("illegal seek")
    49  )
    50  
    51  // Notes
    52  const (
    53  	SIGABRT = Note("abort")
    54  	SIGALRM = Note("alarm")
    55  	SIGHUP  = Note("hangup")
    56  	SIGINT  = Note("interrupt")
    57  	SIGKILL = Note("kill")
    58  	SIGTERM = Note("interrupt")
    59  )
    60  

View as plain text