Repository: incubator-mynewt-newt Updated Branches: refs/heads/0_10_0_dev 5528d6fcf -> 1a719361d
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/1a719361/newt/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go ---------------------------------------------------------------------- diff --git a/newt/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go b/newt/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go index 34edb36..a923bef 100644 --- a/newt/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go +++ b/newt/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go @@ -613,6 +613,26 @@ const ( AT_SYMLINK_NOFOLLOW = 0x100 ) +type PollFd struct { + Fd int32 + Events int16 + Revents int16 +} + +const ( + POLLIN = 0x1 + POLLPRI = 0x2 + POLLOUT = 0x4 + POLLRDHUP = 0x2000 + POLLERR = 0x8 + POLLHUP = 0x10 + POLLNVAL = 0x20 +) + +type Sigset_t struct { + X__val [16]uint64 +} + type Termios struct { Iflag uint32 Oflag uint32 http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/1a719361/newt/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go ---------------------------------------------------------------------- diff --git a/newt/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go b/newt/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go index 0fef350..817ac9c 100644 --- a/newt/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go +++ b/newt/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go @@ -575,6 +575,26 @@ const ( AT_SYMLINK_NOFOLLOW = 0x100 ) +type PollFd struct { + Fd int32 + Events int16 + Revents int16 +} + +const ( + POLLIN = 0x1 + POLLPRI = 0x2 + POLLOUT = 0x4 + POLLRDHUP = 0x2000 + POLLERR = 0x8 + POLLHUP = 0x10 + POLLNVAL = 0x20 +) + +type Sigset_t struct { + X__val [16]uint64 +} + type Termios struct { Iflag uint32 Oflag uint32 http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/1a719361/newt/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go ---------------------------------------------------------------------- diff --git a/newt/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go b/newt/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go index 28b7cd4..e786add 100644 --- a/newt/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go +++ b/newt/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go @@ -592,6 +592,26 @@ const ( AT_SYMLINK_NOFOLLOW = 0x100 ) +type PollFd struct { + Fd int32 + Events int16 + Revents int16 +} + +const ( + POLLIN = 0x1 + POLLPRI = 0x2 + POLLOUT = 0x4 + POLLRDHUP = 0x2000 + POLLERR = 0x8 + POLLHUP = 0x10 + POLLNVAL = 0x20 +) + +type Sigset_t struct { + X__val [16]uint64 +} + type Termios struct { Iflag uint32 Oflag uint32 http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/1a719361/newt/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go ---------------------------------------------------------------------- diff --git a/newt/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go b/newt/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go index 8fe5af2..b29894d 100644 --- a/newt/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go +++ b/newt/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go @@ -596,6 +596,26 @@ const ( AT_SYMLINK_NOFOLLOW = 0x100 ) +type PollFd struct { + Fd int32 + Events int16 + Revents int16 +} + +const ( + POLLIN = 0x1 + POLLPRI = 0x2 + POLLOUT = 0x4 + POLLRDHUP = 0x2000 + POLLERR = 0x8 + POLLHUP = 0x10 + POLLNVAL = 0x20 +) + +type Sigset_t struct { + X__val [16]uint64 +} + type Termios struct { Iflag uint32 Oflag uint32 http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/1a719361/newt/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go ---------------------------------------------------------------------- diff --git a/newt/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go b/newt/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go index df16e83..d9af71b 100644 --- a/newt/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go +++ b/newt/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go @@ -596,6 +596,26 @@ const ( AT_SYMLINK_NOFOLLOW = 0x100 ) +type PollFd struct { + Fd int32 + Events int16 + Revents int16 +} + +const ( + POLLIN = 0x1 + POLLPRI = 0x2 + POLLOUT = 0x4 + POLLRDHUP = 0x2000 + POLLERR = 0x8 + POLLHUP = 0x10 + POLLNVAL = 0x20 +) + +type Sigset_t struct { + X__val [16]uint64 +} + type Termios struct { Iflag uint32 Oflag uint32 http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/1a719361/newt/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go ---------------------------------------------------------------------- diff --git a/newt/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go b/newt/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go index 66d99ea..4218170 100644 --- a/newt/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go +++ b/newt/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go @@ -589,9 +589,10 @@ type Ustat_t struct { } type EpollEvent struct { - Events uint32 - Fd int32 - Pad int32 + Events uint32 + X_padFd int32 + Fd int32 + Pad int32 } const ( @@ -601,6 +602,26 @@ const ( AT_SYMLINK_NOFOLLOW = 0x100 ) +type PollFd struct { + Fd int32 + Events int16 + Revents int16 +} + +const ( + POLLIN = 0x1 + POLLPRI = 0x2 + POLLOUT = 0x4 + POLLRDHUP = 0x2000 + POLLERR = 0x8 + POLLHUP = 0x10 + POLLNVAL = 0x20 +) + +type Sigset_t struct { + X__val [16]uint64 +} + type Termios struct { Iflag uint32 Oflag uint32 http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/1a719361/newt/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go ---------------------------------------------------------------------- diff --git a/newt/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go b/newt/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go index f7c8451..7db4c78 100644 --- a/newt/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go +++ b/newt/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go @@ -589,9 +589,10 @@ type Ustat_t struct { } type EpollEvent struct { - Events uint32 - Fd int32 - Pad int32 + Events uint32 + X_padFd int32 + Fd int32 + Pad int32 } const ( @@ -601,6 +602,26 @@ const ( AT_SYMLINK_NOFOLLOW = 0x100 ) +type PollFd struct { + Fd int32 + Events int16 + Revents int16 +} + +const ( + POLLIN = 0x1 + POLLPRI = 0x2 + POLLOUT = 0x4 + POLLRDHUP = 0x2000 + POLLERR = 0x8 + POLLHUP = 0x10 + POLLNVAL = 0x20 +) + +type Sigset_t struct { + X__val [16]uint64 +} + type Termios struct { Iflag uint32 Oflag uint32 http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/1a719361/newt/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go ---------------------------------------------------------------------- diff --git a/newt/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go b/newt/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go new file mode 100644 index 0000000..76ee57c --- /dev/null +++ b/newt/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go @@ -0,0 +1,649 @@ +// +build s390x,linux +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs -- -fsigned-char types_linux.go + +package unix + +const ( + sizeofPtr = 0x8 + sizeofShort = 0x2 + sizeofInt = 0x4 + sizeofLong = 0x8 + sizeofLongLong = 0x8 + PathMax = 0x1000 +) + +type ( + _C_short int16 + _C_int int32 + _C_long int64 + _C_long_long int64 +) + +type Timespec struct { + Sec int64 + Nsec int64 +} + +type Timeval struct { + Sec int64 + Usec int64 +} + +type Timex struct { + Modes uint32 + _ [4]byte + Offset int64 + Freq int64 + Maxerror int64 + Esterror int64 + Status int32 + _ [4]byte + Constant int64 + Precision int64 + Tolerance int64 + Time Timeval + Tick int64 + Ppsfreq int64 + Jitter int64 + Shift int32 + _ [4]byte + Stabil int64 + Jitcnt int64 + Calcnt int64 + Errcnt int64 + Stbcnt int64 + Tai int32 + _ [44]byte +} + +type Time_t int64 + +type Tms struct { + Utime int64 + Stime int64 + Cutime int64 + Cstime int64 +} + +type Utimbuf struct { + Actime int64 + Modtime int64 +} + +type Rusage struct { + Utime Timeval + Stime Timeval + Maxrss int64 + Ixrss int64 + Idrss int64 + Isrss int64 + Minflt int64 + Majflt int64 + Nswap int64 + Inblock int64 + Oublock int64 + Msgsnd int64 + Msgrcv int64 + Nsignals int64 + Nvcsw int64 + Nivcsw int64 +} + +type Rlimit struct { + Cur uint64 + Max uint64 +} + +type _Gid_t uint32 + +type Stat_t struct { + Dev uint64 + Ino uint64 + Nlink uint64 + Mode uint32 + Uid uint32 + Gid uint32 + _ int32 + Rdev uint64 + Size int64 + Atim Timespec + Mtim Timespec + Ctim Timespec + Blksize int64 + Blocks int64 + _ [3]int64 +} + +type Statfs_t struct { + Type uint32 + Bsize uint32 + Blocks uint64 + Bfree uint64 + Bavail uint64 + Files uint64 + Ffree uint64 + Fsid Fsid + Namelen uint32 + Frsize uint32 + Flags uint32 + Spare [4]uint32 + _ [4]byte +} + +type Dirent struct { + Ino uint64 + Off int64 + Reclen uint16 + Type uint8 + Name [256]int8 + _ [5]byte +} + +type Fsid struct { + _ [2]int32 +} + +type Flock_t struct { + Type int16 + Whence int16 + _ [4]byte + Start int64 + Len int64 + Pid int32 + _ [4]byte +} + +const ( + FADV_NORMAL = 0x0 + FADV_RANDOM = 0x1 + FADV_SEQUENTIAL = 0x2 + FADV_WILLNEED = 0x3 + FADV_DONTNEED = 0x6 + FADV_NOREUSE = 0x7 +) + +type RawSockaddrInet4 struct { + Family uint16 + Port uint16 + Addr [4]byte /* in_addr */ + Zero [8]uint8 +} + +type RawSockaddrInet6 struct { + Family uint16 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 +} + +type RawSockaddrUnix struct { + Family uint16 + Path [108]int8 +} + +type RawSockaddrLinklayer struct { + Family uint16 + Protocol uint16 + Ifindex int32 + Hatype uint16 + Pkttype uint8 + Halen uint8 + Addr [8]uint8 +} + +type RawSockaddrNetlink struct { + Family uint16 + Pad uint16 + Pid uint32 + Groups uint32 +} + +type RawSockaddrHCI struct { + Family uint16 + Dev uint16 + Channel uint16 +} + +type RawSockaddr struct { + Family uint16 + Data [14]int8 +} + +type RawSockaddrAny struct { + Addr RawSockaddr + Pad [96]int8 +} + +type _Socklen uint32 + +type Linger struct { + Onoff int32 + Linger int32 +} + +type Iovec struct { + Base *byte + Len uint64 +} + +type IPMreq struct { + Multiaddr [4]byte /* in_addr */ + Interface [4]byte /* in_addr */ +} + +type IPMreqn struct { + Multiaddr [4]byte /* in_addr */ + Address [4]byte /* in_addr */ + Ifindex int32 +} + +type IPv6Mreq struct { + Multiaddr [16]byte /* in6_addr */ + Interface uint32 +} + +type Msghdr struct { + Name *byte + Namelen uint32 + _ [4]byte + Iov *Iovec + Iovlen uint64 + Control *byte + Controllen uint64 + Flags int32 + _ [4]byte +} + +type Cmsghdr struct { + Len uint64 + Level int32 + Type int32 +} + +type Inet4Pktinfo struct { + Ifindex int32 + Spec_dst [4]byte /* in_addr */ + Addr [4]byte /* in_addr */ +} + +type Inet6Pktinfo struct { + Addr [16]byte /* in6_addr */ + Ifindex uint32 +} + +type IPv6MTUInfo struct { + Addr RawSockaddrInet6 + Mtu uint32 +} + +type ICMPv6Filter struct { + Data [8]uint32 +} + +type Ucred struct { + Pid int32 + Uid uint32 + Gid uint32 +} + +type TCPInfo struct { + State uint8 + Ca_state uint8 + Retransmits uint8 + Probes uint8 + Backoff uint8 + Options uint8 + _ [2]byte + Rto uint32 + Ato uint32 + Snd_mss uint32 + Rcv_mss uint32 + Unacked uint32 + Sacked uint32 + Lost uint32 + Retrans uint32 + Fackets uint32 + Last_data_sent uint32 + Last_ack_sent uint32 + Last_data_recv uint32 + Last_ack_recv uint32 + Pmtu uint32 + Rcv_ssthresh uint32 + Rtt uint32 + Rttvar uint32 + Snd_ssthresh uint32 + Snd_cwnd uint32 + Advmss uint32 + Reordering uint32 + Rcv_rtt uint32 + Rcv_space uint32 + Total_retrans uint32 +} + +const ( + SizeofSockaddrInet4 = 0x10 + SizeofSockaddrInet6 = 0x1c + SizeofSockaddrAny = 0x70 + SizeofSockaddrUnix = 0x6e + SizeofSockaddrLinklayer = 0x14 + SizeofSockaddrNetlink = 0xc + SizeofSockaddrHCI = 0x6 + SizeofLinger = 0x8 + SizeofIPMreq = 0x8 + SizeofIPMreqn = 0xc + SizeofIPv6Mreq = 0x14 + SizeofMsghdr = 0x38 + SizeofCmsghdr = 0x10 + SizeofInet4Pktinfo = 0xc + SizeofInet6Pktinfo = 0x14 + SizeofIPv6MTUInfo = 0x20 + SizeofICMPv6Filter = 0x20 + SizeofUcred = 0xc + SizeofTCPInfo = 0x68 +) + +const ( + IFA_UNSPEC = 0x0 + IFA_ADDRESS = 0x1 + IFA_LOCAL = 0x2 + IFA_LABEL = 0x3 + IFA_BROADCAST = 0x4 + IFA_ANYCAST = 0x5 + IFA_CACHEINFO = 0x6 + IFA_MULTICAST = 0x7 + IFLA_UNSPEC = 0x0 + IFLA_ADDRESS = 0x1 + IFLA_BROADCAST = 0x2 + IFLA_IFNAME = 0x3 + IFLA_MTU = 0x4 + IFLA_LINK = 0x5 + IFLA_QDISC = 0x6 + IFLA_STATS = 0x7 + IFLA_COST = 0x8 + IFLA_PRIORITY = 0x9 + IFLA_MASTER = 0xa + IFLA_WIRELESS = 0xb + IFLA_PROTINFO = 0xc + IFLA_TXQLEN = 0xd + IFLA_MAP = 0xe + IFLA_WEIGHT = 0xf + IFLA_OPERSTATE = 0x10 + IFLA_LINKMODE = 0x11 + IFLA_LINKINFO = 0x12 + IFLA_NET_NS_PID = 0x13 + IFLA_IFALIAS = 0x14 + IFLA_MAX = 0x27 + RT_SCOPE_UNIVERSE = 0x0 + RT_SCOPE_SITE = 0xc8 + RT_SCOPE_LINK = 0xfd + RT_SCOPE_HOST = 0xfe + RT_SCOPE_NOWHERE = 0xff + RT_TABLE_UNSPEC = 0x0 + RT_TABLE_COMPAT = 0xfc + RT_TABLE_DEFAULT = 0xfd + RT_TABLE_MAIN = 0xfe + RT_TABLE_LOCAL = 0xff + RT_TABLE_MAX = 0xffffffff + RTA_UNSPEC = 0x0 + RTA_DST = 0x1 + RTA_SRC = 0x2 + RTA_IIF = 0x3 + RTA_OIF = 0x4 + RTA_GATEWAY = 0x5 + RTA_PRIORITY = 0x6 + RTA_PREFSRC = 0x7 + RTA_METRICS = 0x8 + RTA_MULTIPATH = 0x9 + RTA_FLOW = 0xb + RTA_CACHEINFO = 0xc + RTA_TABLE = 0xf + RTN_UNSPEC = 0x0 + RTN_UNICAST = 0x1 + RTN_LOCAL = 0x2 + RTN_BROADCAST = 0x3 + RTN_ANYCAST = 0x4 + RTN_MULTICAST = 0x5 + RTN_BLACKHOLE = 0x6 + RTN_UNREACHABLE = 0x7 + RTN_PROHIBIT = 0x8 + RTN_THROW = 0x9 + RTN_NAT = 0xa + RTN_XRESOLVE = 0xb + RTNLGRP_NONE = 0x0 + RTNLGRP_LINK = 0x1 + RTNLGRP_NOTIFY = 0x2 + RTNLGRP_NEIGH = 0x3 + RTNLGRP_TC = 0x4 + RTNLGRP_IPV4_IFADDR = 0x5 + RTNLGRP_IPV4_MROUTE = 0x6 + RTNLGRP_IPV4_ROUTE = 0x7 + RTNLGRP_IPV4_RULE = 0x8 + RTNLGRP_IPV6_IFADDR = 0x9 + RTNLGRP_IPV6_MROUTE = 0xa + RTNLGRP_IPV6_ROUTE = 0xb + RTNLGRP_IPV6_IFINFO = 0xc + RTNLGRP_IPV6_PREFIX = 0x12 + RTNLGRP_IPV6_RULE = 0x13 + RTNLGRP_ND_USEROPT = 0x14 + SizeofNlMsghdr = 0x10 + SizeofNlMsgerr = 0x14 + SizeofRtGenmsg = 0x1 + SizeofNlAttr = 0x4 + SizeofRtAttr = 0x4 + SizeofIfInfomsg = 0x10 + SizeofIfAddrmsg = 0x8 + SizeofRtMsg = 0xc + SizeofRtNexthop = 0x8 +) + +type NlMsghdr struct { + Len uint32 + Type uint16 + Flags uint16 + Seq uint32 + Pid uint32 +} + +type NlMsgerr struct { + Error int32 + Msg NlMsghdr +} + +type RtGenmsg struct { + Family uint8 +} + +type NlAttr struct { + Len uint16 + Type uint16 +} + +type RtAttr struct { + Len uint16 + Type uint16 +} + +type IfInfomsg struct { + Family uint8 + _ uint8 + Type uint16 + Index int32 + Flags uint32 + Change uint32 +} + +type IfAddrmsg struct { + Family uint8 + Prefixlen uint8 + Flags uint8 + Scope uint8 + Index uint32 +} + +type RtMsg struct { + Family uint8 + Dst_len uint8 + Src_len uint8 + Tos uint8 + Table uint8 + Protocol uint8 + Scope uint8 + Type uint8 + Flags uint32 +} + +type RtNexthop struct { + Len uint16 + Flags uint8 + Hops uint8 + Ifindex int32 +} + +const ( + SizeofSockFilter = 0x8 + SizeofSockFprog = 0x10 +) + +type SockFilter struct { + Code uint16 + Jt uint8 + Jf uint8 + K uint32 +} + +type SockFprog struct { + Len uint16 + _ [6]byte + Filter *SockFilter +} + +type InotifyEvent struct { + Wd int32 + Mask uint32 + Cookie uint32 + Len uint32 +} + +const SizeofInotifyEvent = 0x10 + +type PtraceRegs struct { + Psw PtracePsw + Gprs [16]uint64 + Acrs [16]uint32 + Orig_gpr2 uint64 + Fp_regs PtraceFpregs + Per_info PtracePer + Ieee_instruction_pointer uint64 +} + +type PtracePsw struct { + Mask uint64 + Addr uint64 +} + +type PtraceFpregs struct { + Fpc uint32 + _ [4]byte + Fprs [16]float64 +} + +type PtracePer struct { + _ [0]uint64 + _ [24]byte + _ [8]byte + Starting_addr uint64 + Ending_addr uint64 + Perc_atmid uint16 + _ [6]byte + Address uint64 + Access_id uint8 + _ [7]byte +} + +type FdSet struct { + Bits [16]int64 +} + +type Sysinfo_t struct { + Uptime int64 + Loads [3]uint64 + Totalram uint64 + Freeram uint64 + Sharedram uint64 + Bufferram uint64 + Totalswap uint64 + Freeswap uint64 + Procs uint16 + Pad uint16 + _ [4]byte + Totalhigh uint64 + Freehigh uint64 + Unit uint32 + _ [0]int8 + _ [4]byte +} + +type Utsname struct { + Sysname [65]int8 + Nodename [65]int8 + Release [65]int8 + Version [65]int8 + Machine [65]int8 + Domainname [65]int8 +} + +type Ustat_t struct { + Tfree int32 + _ [4]byte + Tinode uint64 + Fname [6]int8 + Fpack [6]int8 + _ [4]byte +} + +type EpollEvent struct { + Events uint32 + _ int32 + Fd int32 + Pad int32 +} + +const ( + AT_FDCWD = -0x64 + AT_REMOVEDIR = 0x200 + AT_SYMLINK_FOLLOW = 0x400 + AT_SYMLINK_NOFOLLOW = 0x100 +) + +type PollFd struct { + Fd int32 + Events int16 + Revents int16 +} + +const ( + POLLIN = 0x1 + POLLPRI = 0x2 + POLLOUT = 0x4 + POLLRDHUP = 0x2000 + POLLERR = 0x8 + POLLHUP = 0x10 + POLLNVAL = 0x20 +) + +type Sigset_t struct { + X__val [16]uint64 +} + +type Termios struct { + Iflag uint32 + Oflag uint32 + Cflag uint32 + Lflag uint32 + Line uint8 + Cc [19]uint8 + Ispeed uint32 + Ospeed uint32 +} http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/1a719361/newt/vendor/gopkg.in/fsnotify.v1/.travis.yml ---------------------------------------------------------------------- diff --git a/newt/vendor/gopkg.in/fsnotify.v1/.travis.yml b/newt/vendor/gopkg.in/fsnotify.v1/.travis.yml index 7098876..00fd5dd 100644 --- a/newt/vendor/gopkg.in/fsnotify.v1/.travis.yml +++ b/newt/vendor/gopkg.in/fsnotify.v1/.travis.yml @@ -2,7 +2,13 @@ sudo: false language: go go: - - 1.5.2 + - 1.5.4 + - 1.6.1 + - tip + +matrix: + allow_failures: + - go: tip before_script: - go get -u github.com/golang/lint/golint http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/1a719361/newt/vendor/gopkg.in/fsnotify.v1/AUTHORS ---------------------------------------------------------------------- diff --git a/newt/vendor/gopkg.in/fsnotify.v1/AUTHORS b/newt/vendor/gopkg.in/fsnotify.v1/AUTHORS index 2b9d1fd..71c47ce 100644 --- a/newt/vendor/gopkg.in/fsnotify.v1/AUTHORS +++ b/newt/vendor/gopkg.in/fsnotify.v1/AUTHORS @@ -9,6 +9,9 @@ # Please keep the list sorted. Adrien Bustany <[email protected]> +Amit Krishnan <[email protected]> +Bjørn Erik Pedersen <[email protected]> +Bruno Bigras <[email protected]> Caleb Spare <[email protected]> Case Nelson <[email protected]> Chris Howey <[email protected]> <[email protected]> @@ -30,6 +33,7 @@ Pursuit92 <[email protected]> Riku Voipio <[email protected]> Rob Figueiredo <[email protected]> Soge Zhang <[email protected]> +Tiffany Jernigan <[email protected]> Tilak Sharma <[email protected]> Travis Cline <[email protected]> Tudor Golubenco <[email protected]> http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/1a719361/newt/vendor/gopkg.in/fsnotify.v1/CHANGELOG.md ---------------------------------------------------------------------- diff --git a/newt/vendor/gopkg.in/fsnotify.v1/CHANGELOG.md b/newt/vendor/gopkg.in/fsnotify.v1/CHANGELOG.md index 44ca62e..f6c7c48 100644 --- a/newt/vendor/gopkg.in/fsnotify.v1/CHANGELOG.md +++ b/newt/vendor/gopkg.in/fsnotify.v1/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## v1.3.1 / 2016-06-28 + +* windows: fix for double backslash when watching the root of a drive [#151](https://github.com/fsnotify/fsnotify/issues/151) (thanks @brunoqc) + +## v1.3.0 / 2016-04-19 + +* Support linux/arm64 by [patching](https://go-review.googlesource.com/#/c/21971/) x/sys/unix and switching to to it from syscall (thanks @suihkulokki) [#135](https://github.com/fsnotify/fsnotify/pull/135) + ## v1.2.10 / 2016-03-02 * Fix golint errors in windows.go [#121](https://github.com/fsnotify/fsnotify/pull/121) (thanks @tiffanyfj) http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/1a719361/newt/vendor/gopkg.in/fsnotify.v1/README.md ---------------------------------------------------------------------- diff --git a/newt/vendor/gopkg.in/fsnotify.v1/README.md b/newt/vendor/gopkg.in/fsnotify.v1/README.md index ba184c0..5ebce86 100644 --- a/newt/vendor/gopkg.in/fsnotify.v1/README.md +++ b/newt/vendor/gopkg.in/fsnotify.v1/README.md @@ -2,7 +2,11 @@ [](https://godoc.org/github.com/fsnotify/fsnotify) [](https://goreportcard.com/report/github.com/fsnotify/fsnotify) [](http://gocover.io/github.com/fsnotify/fsnotify) -Go 1.3+ required. +fsnotify utilizes [golang.org/x/sys](https://godoc.org/golang.org/x/sys) rather than `syscall` from the standard library. Ensure you have the latest version installed by running: + +```console +go get -u golang.org/x/sys/... +``` Cross platform: Windows, Linux, BSD and OS X. @@ -12,7 +16,7 @@ Cross platform: Windows, Linux, BSD and OS X. |kqueue |BSD, OS X, iOS\*|Supported [](https://travis-ci.org/fsnotify/fsnotify)| |ReadDirectoryChangesW|Windows|Supported [](https://ci.appveyor.com/project/NathanYoungman/fsnotify/branch/master)| |FSEvents |OS X |[Planned](https://github.com/fsnotify/fsnotify/issues/11)| -|FEN |Solaris 11 |[Planned](https://github.com/fsnotify/fsnotify/issues/12)| +|FEN |Solaris 11 |[In Progress](https://github.com/fsnotify/fsnotify/issues/12)| |fanotify |Linux 2.6.37+ | | |USN Journals |Windows |[Maybe](https://github.com/fsnotify/fsnotify/issues/53)| |Polling |*All* |[Maybe](https://github.com/fsnotify/fsnotify/issues/9)| @@ -27,7 +31,7 @@ fsnotify is a fork of [howeyc/fsnotify](https://godoc.org/github.com/howeyc/fsno All [releases](https://github.com/fsnotify/fsnotify/releases) are tagged based on [Semantic Versioning](http://semver.org/). Further API changes are [planned](https://github.com/fsnotify/fsnotify/milestones), and will be tagged with a new major revision number. -Go 1.6 supports dependencies located in the `vendor/` folder. Unless you are creating a library, it is recommended that you copy fsnotify into `vendor/github.com/fsnotify/fsnotify` within your project. +Go 1.6 supports dependencies located in the `vendor/` folder. Unless you are creating a library, it is recommended that you copy fsnotify into `vendor/github.com/fsnotify/fsnotify` within your project, and likewise for `golang.org/x/sys`. ## Contributing http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/1a719361/newt/vendor/gopkg.in/fsnotify.v1/fen.go ---------------------------------------------------------------------- diff --git a/newt/vendor/gopkg.in/fsnotify.v1/fen.go b/newt/vendor/gopkg.in/fsnotify.v1/fen.go new file mode 100644 index 0000000..ced39cb --- /dev/null +++ b/newt/vendor/gopkg.in/fsnotify.v1/fen.go @@ -0,0 +1,37 @@ +// Copyright 2010 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build solaris + +package fsnotify + +import ( + "errors" +) + +// Watcher watches a set of files, delivering events to a channel. +type Watcher struct { + Events chan Event + Errors chan error +} + +// NewWatcher establishes a new watcher with the underlying OS and begins waiting for events. +func NewWatcher() (*Watcher, error) { + return nil, errors.New("FEN based watcher not yet supported for fsnotify\n") +} + +// Close removes all watches and closes the events channel. +func (w *Watcher) Close() error { + return nil +} + +// Add starts watching the named file or directory (non-recursively). +func (w *Watcher) Add(name string) error { + return nil +} + +// Remove stops watching the the named file or directory (non-recursively). +func (w *Watcher) Remove(name string) error { + return nil +} http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/1a719361/newt/vendor/gopkg.in/fsnotify.v1/fsnotify.go ---------------------------------------------------------------------- diff --git a/newt/vendor/gopkg.in/fsnotify.v1/fsnotify.go b/newt/vendor/gopkg.in/fsnotify.v1/fsnotify.go index c899ee0..d1d39a0 100644 --- a/newt/vendor/gopkg.in/fsnotify.v1/fsnotify.go +++ b/newt/vendor/gopkg.in/fsnotify.v1/fsnotify.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build !plan9,!solaris +// +build !plan9 // Package fsnotify provides a platform-independent interface for file system notifications. package fsnotify http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/1a719361/newt/vendor/gopkg.in/fsnotify.v1/inotify.go ---------------------------------------------------------------------- diff --git a/newt/vendor/gopkg.in/fsnotify.v1/inotify.go b/newt/vendor/gopkg.in/fsnotify.v1/inotify.go index 06f4bba..9700df5 100644 --- a/newt/vendor/gopkg.in/fsnotify.v1/inotify.go +++ b/newt/vendor/gopkg.in/fsnotify.v1/inotify.go @@ -14,8 +14,9 @@ import ( "path/filepath" "strings" "sync" - "syscall" "unsafe" + + "golang.org/x/sys/unix" ) // Watcher watches a set of files, delivering events to a channel. @@ -35,14 +36,14 @@ type Watcher struct { // NewWatcher establishes a new watcher with the underlying OS and begins waiting for events. func NewWatcher() (*Watcher, error) { // Create inotify fd - fd, errno := syscall.InotifyInit() + fd, errno := unix.InotifyInit() if fd == -1 { return nil, errno } // Create epoll poller, err := newFdPoller(fd) if err != nil { - syscall.Close(fd) + unix.Close(fd) return nil, err } w := &Watcher{ @@ -95,9 +96,9 @@ func (w *Watcher) Add(name string) error { return errors.New("inotify instance already closed") } - const agnosticEvents = syscall.IN_MOVED_TO | syscall.IN_MOVED_FROM | - syscall.IN_CREATE | syscall.IN_ATTRIB | syscall.IN_MODIFY | - syscall.IN_MOVE_SELF | syscall.IN_DELETE | syscall.IN_DELETE_SELF + const agnosticEvents = unix.IN_MOVED_TO | unix.IN_MOVED_FROM | + unix.IN_CREATE | unix.IN_ATTRIB | unix.IN_MODIFY | + unix.IN_MOVE_SELF | unix.IN_DELETE | unix.IN_DELETE_SELF var flags uint32 = agnosticEvents @@ -106,9 +107,9 @@ func (w *Watcher) Add(name string) error { w.mu.Unlock() if found { watchEntry.flags |= flags - flags |= syscall.IN_MASK_ADD + flags |= unix.IN_MASK_ADD } - wd, errno := syscall.InotifyAddWatch(w.fd, name, flags) + wd, errno := unix.InotifyAddWatch(w.fd, name, flags) if wd == -1 { return errno } @@ -140,7 +141,7 @@ func (w *Watcher) Remove(name string) error { // by calling inotify_rm_watch() below. e.g. readEvents() goroutine receives IN_IGNORE // so that EINVAL means that the wd is being rm_watch()ed or its file removed // by another thread and we have not received IN_IGNORE event. - success, errno := syscall.InotifyRmWatch(w.fd, watch.wd) + success, errno := unix.InotifyRmWatch(w.fd, watch.wd) if success == -1 { // TODO: Perhaps it's not helpful to return an error here in every case. // the only two possible errors are: @@ -170,16 +171,16 @@ type watch struct { // received events into Event objects and sends them via the Events channel func (w *Watcher) readEvents() { var ( - buf [syscall.SizeofInotifyEvent * 4096]byte // Buffer for a maximum of 4096 raw events - n int // Number of bytes read with read() - errno error // Syscall errno - ok bool // For poller.wait + buf [unix.SizeofInotifyEvent * 4096]byte // Buffer for a maximum of 4096 raw events + n int // Number of bytes read with read() + errno error // Syscall errno + ok bool // For poller.wait ) defer close(w.doneResp) defer close(w.Errors) defer close(w.Events) - defer syscall.Close(w.fd) + defer unix.Close(w.fd) defer w.poller.close() for { @@ -202,26 +203,26 @@ func (w *Watcher) readEvents() { continue } - n, errno = syscall.Read(w.fd, buf[:]) + n, errno = unix.Read(w.fd, buf[:]) // If a signal interrupted execution, see if we've been asked to close, and try again. // http://man7.org/linux/man-pages/man7/signal.7.html : // "Before Linux 3.8, reads from an inotify(7) file descriptor were not restartable" - if errno == syscall.EINTR { + if errno == unix.EINTR { continue } - // syscall.Read might have been woken up by Close. If so, we're done. + // unix.Read might have been woken up by Close. If so, we're done. if w.isClosed() { return } - if n < syscall.SizeofInotifyEvent { + if n < unix.SizeofInotifyEvent { var err error if n == 0 { // If EOF is received. This should really never happen. err = io.EOF } else if n < 0 { - // If an error occured while reading. + // If an error occurred while reading. err = errno } else { // Read was too short. @@ -238,9 +239,9 @@ func (w *Watcher) readEvents() { var offset uint32 // We don't know how many events we just read into the buffer // While the offset points to at least one whole event... - for offset <= uint32(n-syscall.SizeofInotifyEvent) { + for offset <= uint32(n-unix.SizeofInotifyEvent) { // Point "raw" to the event in the buffer - raw := (*syscall.InotifyEvent)(unsafe.Pointer(&buf[offset])) + raw := (*unix.InotifyEvent)(unsafe.Pointer(&buf[offset])) mask := uint32(raw.Mask) nameLen := uint32(raw.Len) @@ -253,7 +254,7 @@ func (w *Watcher) readEvents() { w.mu.Unlock() if nameLen > 0 { // Point "bytes" at the first byte of the filename - bytes := (*[syscall.PathMax]byte)(unsafe.Pointer(&buf[offset+syscall.SizeofInotifyEvent])) + bytes := (*[unix.PathMax]byte)(unsafe.Pointer(&buf[offset+unix.SizeofInotifyEvent])) // The filename is padded with NULL bytes. TrimRight() gets rid of those. name += "/" + strings.TrimRight(string(bytes[0:nameLen]), "\000") } @@ -270,7 +271,7 @@ func (w *Watcher) readEvents() { } // Move to the next event in the buffer - offset += syscall.SizeofInotifyEvent + nameLen + offset += unix.SizeofInotifyEvent + nameLen } } } @@ -280,7 +281,7 @@ func (w *Watcher) readEvents() { // against files that do not exist. func (e *Event) ignoreLinux(w *Watcher, wd int32, mask uint32) bool { // Ignore anything the inotify API says to ignore - if mask&syscall.IN_IGNORED == syscall.IN_IGNORED { + if mask&unix.IN_IGNORED == unix.IN_IGNORED { w.mu.Lock() defer w.mu.Unlock() name := w.paths[int(wd)] @@ -305,19 +306,19 @@ func (e *Event) ignoreLinux(w *Watcher, wd int32, mask uint32) bool { // newEvent returns an platform-independent Event based on an inotify mask. func newEvent(name string, mask uint32) Event { e := Event{Name: name} - if mask&syscall.IN_CREATE == syscall.IN_CREATE || mask&syscall.IN_MOVED_TO == syscall.IN_MOVED_TO { + if mask&unix.IN_CREATE == unix.IN_CREATE || mask&unix.IN_MOVED_TO == unix.IN_MOVED_TO { e.Op |= Create } - if mask&syscall.IN_DELETE_SELF == syscall.IN_DELETE_SELF || mask&syscall.IN_DELETE == syscall.IN_DELETE { + if mask&unix.IN_DELETE_SELF == unix.IN_DELETE_SELF || mask&unix.IN_DELETE == unix.IN_DELETE { e.Op |= Remove } - if mask&syscall.IN_MODIFY == syscall.IN_MODIFY { + if mask&unix.IN_MODIFY == unix.IN_MODIFY { e.Op |= Write } - if mask&syscall.IN_MOVE_SELF == syscall.IN_MOVE_SELF || mask&syscall.IN_MOVED_FROM == syscall.IN_MOVED_FROM { + if mask&unix.IN_MOVE_SELF == unix.IN_MOVE_SELF || mask&unix.IN_MOVED_FROM == unix.IN_MOVED_FROM { e.Op |= Rename } - if mask&syscall.IN_ATTRIB == syscall.IN_ATTRIB { + if mask&unix.IN_ATTRIB == unix.IN_ATTRIB { e.Op |= Chmod } return e http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/1a719361/newt/vendor/gopkg.in/fsnotify.v1/inotify_poller.go ---------------------------------------------------------------------- diff --git a/newt/vendor/gopkg.in/fsnotify.v1/inotify_poller.go b/newt/vendor/gopkg.in/fsnotify.v1/inotify_poller.go index 23a5ca1..cc7db4b 100644 --- a/newt/vendor/gopkg.in/fsnotify.v1/inotify_poller.go +++ b/newt/vendor/gopkg.in/fsnotify.v1/inotify_poller.go @@ -8,7 +8,8 @@ package fsnotify import ( "errors" - "syscall" + + "golang.org/x/sys/unix" ) type fdPoller struct { @@ -39,32 +40,32 @@ func newFdPoller(fd int) (*fdPoller, error) { poller.fd = fd // Create epoll fd - poller.epfd, errno = syscall.EpollCreate1(0) + poller.epfd, errno = unix.EpollCreate1(0) if poller.epfd == -1 { return nil, errno } // Create pipe; pipe[0] is the read end, pipe[1] the write end. - errno = syscall.Pipe2(poller.pipe[:], syscall.O_NONBLOCK) + errno = unix.Pipe2(poller.pipe[:], unix.O_NONBLOCK) if errno != nil { return nil, errno } // Register inotify fd with epoll - event := syscall.EpollEvent{ + event := unix.EpollEvent{ Fd: int32(poller.fd), - Events: syscall.EPOLLIN, + Events: unix.EPOLLIN, } - errno = syscall.EpollCtl(poller.epfd, syscall.EPOLL_CTL_ADD, poller.fd, &event) + errno = unix.EpollCtl(poller.epfd, unix.EPOLL_CTL_ADD, poller.fd, &event) if errno != nil { return nil, errno } // Register pipe fd with epoll - event = syscall.EpollEvent{ + event = unix.EpollEvent{ Fd: int32(poller.pipe[0]), - Events: syscall.EPOLLIN, + Events: unix.EPOLLIN, } - errno = syscall.EpollCtl(poller.epfd, syscall.EPOLL_CTL_ADD, poller.pipe[0], &event) + errno = unix.EpollCtl(poller.epfd, unix.EPOLL_CTL_ADD, poller.pipe[0], &event) if errno != nil { return nil, errno } @@ -80,11 +81,11 @@ func (poller *fdPoller) wait() (bool, error) { // I don't know whether epoll_wait returns the number of events returned, // or the total number of events ready. // I decided to catch both by making the buffer one larger than the maximum. - events := make([]syscall.EpollEvent, 7) + events := make([]unix.EpollEvent, 7) for { - n, errno := syscall.EpollWait(poller.epfd, events, -1) + n, errno := unix.EpollWait(poller.epfd, events, -1) if n == -1 { - if errno == syscall.EINTR { + if errno == unix.EINTR { continue } return false, errno @@ -103,31 +104,31 @@ func (poller *fdPoller) wait() (bool, error) { epollin := false for _, event := range ready { if event.Fd == int32(poller.fd) { - if event.Events&syscall.EPOLLHUP != 0 { + if event.Events&unix.EPOLLHUP != 0 { // This should not happen, but if it does, treat it as a wakeup. epollhup = true } - if event.Events&syscall.EPOLLERR != 0 { + if event.Events&unix.EPOLLERR != 0 { // If an error is waiting on the file descriptor, we should pretend - // something is ready to read, and let syscall.Read pick up the error. + // something is ready to read, and let unix.Read pick up the error. epollerr = true } - if event.Events&syscall.EPOLLIN != 0 { + if event.Events&unix.EPOLLIN != 0 { // There is data to read. epollin = true } } if event.Fd == int32(poller.pipe[0]) { - if event.Events&syscall.EPOLLHUP != 0 { + if event.Events&unix.EPOLLHUP != 0 { // Write pipe descriptor was closed, by us. This means we're closing down the // watcher, and we should wake up. } - if event.Events&syscall.EPOLLERR != 0 { + if event.Events&unix.EPOLLERR != 0 { // If an error is waiting on the pipe file descriptor. // This is an absolute mystery, and should never ever happen. return false, errors.New("Error on the pipe descriptor.") } - if event.Events&syscall.EPOLLIN != 0 { + if event.Events&unix.EPOLLIN != 0 { // This is a regular wakeup, so we have to clear the buffer. err := poller.clearWake() if err != nil { @@ -147,9 +148,9 @@ func (poller *fdPoller) wait() (bool, error) { // Close the write end of the poller. func (poller *fdPoller) wake() error { buf := make([]byte, 1) - n, errno := syscall.Write(poller.pipe[1], buf) + n, errno := unix.Write(poller.pipe[1], buf) if n == -1 { - if errno == syscall.EAGAIN { + if errno == unix.EAGAIN { // Buffer is full, poller will wake. return nil } @@ -161,9 +162,9 @@ func (poller *fdPoller) wake() error { func (poller *fdPoller) clearWake() error { // You have to be woken up a LOT in order to get to 100! buf := make([]byte, 100) - n, errno := syscall.Read(poller.pipe[0], buf) + n, errno := unix.Read(poller.pipe[0], buf) if n == -1 { - if errno == syscall.EAGAIN { + if errno == unix.EAGAIN { // Buffer is empty, someone else cleared our wake. return nil } @@ -175,12 +176,12 @@ func (poller *fdPoller) clearWake() error { // Close all poller file descriptors, but not the one passed to it. func (poller *fdPoller) close() { if poller.pipe[1] != -1 { - syscall.Close(poller.pipe[1]) + unix.Close(poller.pipe[1]) } if poller.pipe[0] != -1 { - syscall.Close(poller.pipe[0]) + unix.Close(poller.pipe[0]) } if poller.epfd != -1 { - syscall.Close(poller.epfd) + unix.Close(poller.epfd) } } http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/1a719361/newt/vendor/gopkg.in/fsnotify.v1/kqueue.go ---------------------------------------------------------------------- diff --git a/newt/vendor/gopkg.in/fsnotify.v1/kqueue.go b/newt/vendor/gopkg.in/fsnotify.v1/kqueue.go index b8ea308..c2b4acb 100644 --- a/newt/vendor/gopkg.in/fsnotify.v1/kqueue.go +++ b/newt/vendor/gopkg.in/fsnotify.v1/kqueue.go @@ -13,8 +13,9 @@ import ( "os" "path/filepath" "sync" - "syscall" "time" + + "golang.org/x/sys/unix" ) // Watcher watches a set of files, delivering events to a channel. @@ -113,12 +114,12 @@ func (w *Watcher) Remove(name string) error { return fmt.Errorf("can't remove non-existent kevent watch for: %s", name) } - const registerRemove = syscall.EV_DELETE + const registerRemove = unix.EV_DELETE if err := register(w.kq, []int{watchfd}, registerRemove, 0); err != nil { return err } - syscall.Close(watchfd) + unix.Close(watchfd) w.mu.Lock() isDir := w.paths[watchfd].isDir @@ -152,7 +153,7 @@ func (w *Watcher) Remove(name string) error { } // Watch all events (except NOTE_EXTEND, NOTE_LINK, NOTE_REVOKE) -const noteAllEvents = syscall.NOTE_DELETE | syscall.NOTE_WRITE | syscall.NOTE_ATTRIB | syscall.NOTE_RENAME +const noteAllEvents = unix.NOTE_DELETE | unix.NOTE_WRITE | unix.NOTE_ATTRIB | unix.NOTE_RENAME // keventWaitTime to block on each read from kevent var keventWaitTime = durationToTimespec(100 * time.Millisecond) @@ -219,7 +220,7 @@ func (w *Watcher) addWatch(name string, flags uint32) (string, error) { } } - watchfd, err = syscall.Open(name, openMode, 0700) + watchfd, err = unix.Open(name, openMode, 0700) if watchfd == -1 { return "", err } @@ -227,9 +228,9 @@ func (w *Watcher) addWatch(name string, flags uint32) (string, error) { isDir = fi.IsDir() } - const registerAdd = syscall.EV_ADD | syscall.EV_CLEAR | syscall.EV_ENABLE + const registerAdd = unix.EV_ADD | unix.EV_CLEAR | unix.EV_ENABLE if err := register(w.kq, []int{watchfd}, registerAdd, flags); err != nil { - syscall.Close(watchfd) + unix.Close(watchfd) return "", err } @@ -245,8 +246,8 @@ func (w *Watcher) addWatch(name string, flags uint32) (string, error) { // or if it was watched before, but perhaps only a NOTE_DELETE (watchDirectoryFiles) w.mu.Lock() - watchDir := (flags&syscall.NOTE_WRITE) == syscall.NOTE_WRITE && - (!alreadyWatching || (w.dirFlags[name]&syscall.NOTE_WRITE) != syscall.NOTE_WRITE) + watchDir := (flags&unix.NOTE_WRITE) == unix.NOTE_WRITE && + (!alreadyWatching || (w.dirFlags[name]&unix.NOTE_WRITE) != unix.NOTE_WRITE) // Store flags so this watch can be updated later w.dirFlags[name] = flags w.mu.Unlock() @@ -263,13 +264,13 @@ func (w *Watcher) addWatch(name string, flags uint32) (string, error) { // readEvents reads from kqueue and converts the received kevents into // Event values that it sends down the Events channel. func (w *Watcher) readEvents() { - eventBuffer := make([]syscall.Kevent_t, 10) + eventBuffer := make([]unix.Kevent_t, 10) for { // See if there is a message on the "done" channel select { case <-w.done: - err := syscall.Close(w.kq) + err := unix.Close(w.kq) if err != nil { w.Errors <- err } @@ -282,7 +283,7 @@ func (w *Watcher) readEvents() { // Get new events kevents, err := read(w.kq, eventBuffer, &keventWaitTime) // EINTR is okay, the syscall was interrupted before timeout expired. - if err != nil && err != syscall.EINTR { + if err != nil && err != unix.EINTR { w.Errors <- err continue } @@ -356,16 +357,16 @@ func (w *Watcher) readEvents() { // newEvent returns an platform-independent Event based on kqueue Fflags. func newEvent(name string, mask uint32) Event { e := Event{Name: name} - if mask&syscall.NOTE_DELETE == syscall.NOTE_DELETE { + if mask&unix.NOTE_DELETE == unix.NOTE_DELETE { e.Op |= Remove } - if mask&syscall.NOTE_WRITE == syscall.NOTE_WRITE { + if mask&unix.NOTE_WRITE == unix.NOTE_WRITE { e.Op |= Write } - if mask&syscall.NOTE_RENAME == syscall.NOTE_RENAME { + if mask&unix.NOTE_RENAME == unix.NOTE_RENAME { e.Op |= Rename } - if mask&syscall.NOTE_ATTRIB == syscall.NOTE_ATTRIB { + if mask&unix.NOTE_ATTRIB == unix.NOTE_ATTRIB { e.Op |= Chmod } return e @@ -451,7 +452,7 @@ func (w *Watcher) internalWatch(name string, fileInfo os.FileInfo) (string, erro flags := w.dirFlags[name] w.mu.Unlock() - flags |= syscall.NOTE_DELETE | syscall.NOTE_RENAME + flags |= unix.NOTE_DELETE | unix.NOTE_RENAME return w.addWatch(name, flags) } @@ -461,7 +462,7 @@ func (w *Watcher) internalWatch(name string, fileInfo os.FileInfo) (string, erro // kqueue creates a new kernel event queue and returns a descriptor. func kqueue() (kq int, err error) { - kq, err = syscall.Kqueue() + kq, err = unix.Kqueue() if kq == -1 { return kq, err } @@ -470,16 +471,16 @@ func kqueue() (kq int, err error) { // register events with the queue func register(kq int, fds []int, flags int, fflags uint32) error { - changes := make([]syscall.Kevent_t, len(fds)) + changes := make([]unix.Kevent_t, len(fds)) for i, fd := range fds { // SetKevent converts int to the platform-specific types: - syscall.SetKevent(&changes[i], fd, syscall.EVFILT_VNODE, flags) + unix.SetKevent(&changes[i], fd, unix.EVFILT_VNODE, flags) changes[i].Fflags = fflags } // register the events - success, err := syscall.Kevent(kq, changes, nil, nil) + success, err := unix.Kevent(kq, changes, nil, nil) if success == -1 { return err } @@ -488,8 +489,8 @@ func register(kq int, fds []int, flags int, fflags uint32) error { // read retrieves pending events, or waits until an event occurs. // A timeout of nil blocks indefinitely, while 0 polls the queue. -func read(kq int, events []syscall.Kevent_t, timeout *syscall.Timespec) ([]syscall.Kevent_t, error) { - n, err := syscall.Kevent(kq, nil, events, timeout) +func read(kq int, events []unix.Kevent_t, timeout *unix.Timespec) ([]unix.Kevent_t, error) { + n, err := unix.Kevent(kq, nil, events, timeout) if err != nil { return nil, err } @@ -497,6 +498,6 @@ func read(kq int, events []syscall.Kevent_t, timeout *syscall.Timespec) ([]sysca } // durationToTimespec prepares a timeout value -func durationToTimespec(d time.Duration) syscall.Timespec { - return syscall.NsecToTimespec(d.Nanoseconds()) +func durationToTimespec(d time.Duration) unix.Timespec { + return unix.NsecToTimespec(d.Nanoseconds()) } http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/1a719361/newt/vendor/gopkg.in/fsnotify.v1/open_mode_bsd.go ---------------------------------------------------------------------- diff --git a/newt/vendor/gopkg.in/fsnotify.v1/open_mode_bsd.go b/newt/vendor/gopkg.in/fsnotify.v1/open_mode_bsd.go index c57ccb4..7d8de14 100644 --- a/newt/vendor/gopkg.in/fsnotify.v1/open_mode_bsd.go +++ b/newt/vendor/gopkg.in/fsnotify.v1/open_mode_bsd.go @@ -6,6 +6,6 @@ package fsnotify -import "syscall" +import "golang.org/x/sys/unix" -const openMode = syscall.O_NONBLOCK | syscall.O_RDONLY +const openMode = unix.O_NONBLOCK | unix.O_RDONLY http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/1a719361/newt/vendor/gopkg.in/fsnotify.v1/open_mode_darwin.go ---------------------------------------------------------------------- diff --git a/newt/vendor/gopkg.in/fsnotify.v1/open_mode_darwin.go b/newt/vendor/gopkg.in/fsnotify.v1/open_mode_darwin.go index 174b2c3..9139e17 100644 --- a/newt/vendor/gopkg.in/fsnotify.v1/open_mode_darwin.go +++ b/newt/vendor/gopkg.in/fsnotify.v1/open_mode_darwin.go @@ -6,7 +6,7 @@ package fsnotify -import "syscall" +import "golang.org/x/sys/unix" // note: this constant is not defined on BSD -const openMode = syscall.O_EVTONLY +const openMode = unix.O_EVTONLY http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/1a719361/newt/vendor/gopkg.in/fsnotify.v1/windows.go ---------------------------------------------------------------------- diff --git a/newt/vendor/gopkg.in/fsnotify.v1/windows.go b/newt/vendor/gopkg.in/fsnotify.v1/windows.go index c836bdb..09436f3 100644 --- a/newt/vendor/gopkg.in/fsnotify.v1/windows.go +++ b/newt/vendor/gopkg.in/fsnotify.v1/windows.go @@ -306,7 +306,7 @@ func (w *Watcher) remWatch(pathname string) error { watch.mask = 0 } else { name := filepath.Base(pathname) - w.sendEvent(watch.path+"\\"+name, watch.names[name]&sysFSIGNORED) + w.sendEvent(filepath.Join(watch.path, name), watch.names[name]&sysFSIGNORED) delete(watch.names, name) } return w.startRead(watch) @@ -316,7 +316,7 @@ func (w *Watcher) remWatch(pathname string) error { func (w *Watcher) deleteWatch(watch *watch) { for name, mask := range watch.names { if mask&provisional == 0 { - w.sendEvent(watch.path+"\\"+name, mask&sysFSIGNORED) + w.sendEvent(filepath.Join(watch.path, name), mask&sysFSIGNORED) } delete(watch.names, name) } @@ -453,7 +453,7 @@ func (w *Watcher) readEvents() { raw := (*syscall.FileNotifyInformation)(unsafe.Pointer(&watch.buf[offset])) buf := (*[syscall.MAX_PATH]uint16)(unsafe.Pointer(&raw.FileName)) name := syscall.UTF16ToString(buf[:raw.FileNameLength/2]) - fullname := watch.path + "\\" + name + fullname := filepath.Join(watch.path, name) var mask uint64 switch raw.Action { @@ -491,7 +491,7 @@ func (w *Watcher) readEvents() { } } if raw.Action == syscall.FILE_ACTION_RENAMED_NEW_NAME { - fullname = watch.path + "\\" + watch.rename + fullname = filepath.Join(watch.path, watch.rename) sendNameEvent() } http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/1a719361/newt/vendor/mynewt.apache.org/newt/LICENSE ---------------------------------------------------------------------- diff --git a/newt/vendor/mynewt.apache.org/newt/LICENSE b/newt/vendor/mynewt.apache.org/newt/LICENSE index a218bbd..88a6f68 100644 --- a/newt/vendor/mynewt.apache.org/newt/LICENSE +++ b/newt/vendor/mynewt.apache.org/newt/LICENSE @@ -206,9 +206,6 @@ details, see newt/vendor/github.com/kr/pretty/License This product bundles kr/text, which is available under the MIT license. For details, see newt/vendor/github.com/kr/text/License -This product bundles go-sqlite3, which is available under the MIT license. For -details, see newt/vendor/github.com/mattn/go-sqlite3/LICENSE - This product bundles mapstructure, which is available under the MIT license. For details, see newt/vendor/github.com/mitchellh/mapstructure/LICENSE
