diff options
author | Bruce Ashfield <bruce.ashfield@windriver.com> | 2017-03-15 21:41:04 -0400 |
---|---|---|
committer | Bruce Ashfield <bruce.ashfield@windriver.com> | 2017-03-20 12:45:10 -0400 |
commit | b44fce825df56c0f26adb6ae1f647ae07f6096ee (patch) | |
tree | 009481b1c4329a97a0d521311d09fcaba8047f59 /recipes-devtools/go-cross/go-1.5/syslog.patch | |
parent | 260add1874d260f0673c3fd8dcd6b75bfcb3e7ce (diff) | |
download | meta-virtualization-b44fce825df56c0f26adb6ae1f647ae07f6096ee.tar.gz |
tools: remove go from meta-virtualization
go is now part of oe-core, so we can drop the meta-virt local recipes.
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Diffstat (limited to 'recipes-devtools/go-cross/go-1.5/syslog.patch')
-rw-r--r-- | recipes-devtools/go-cross/go-1.5/syslog.patch | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/recipes-devtools/go-cross/go-1.5/syslog.patch b/recipes-devtools/go-cross/go-1.5/syslog.patch deleted file mode 100644 index ce82a4f2..00000000 --- a/recipes-devtools/go-cross/go-1.5/syslog.patch +++ /dev/null | |||
@@ -1,57 +0,0 @@ | |||
1 | diff -r -u go/src/log/syslog/syslog.go /home/achang/GOCOPY/go/src/log/syslog/syslog.go | ||
2 | --- go/src/log/syslog/syslog.go 2013-11-28 13:38:28.000000000 -0800 | ||
3 | +++ /home/achang/GOCOPY/go/src/log/syslog/syslog.go 2014-10-03 11:44:37.710403200 -0700 | ||
4 | @@ -33,6 +33,9 @@ | ||
5 | const severityMask = 0x07 | ||
6 | const facilityMask = 0xf8 | ||
7 | |||
8 | +var writeTimeout = 1 * time.Second | ||
9 | +var connectTimeout = 1 * time.Second | ||
10 | + | ||
11 | const ( | ||
12 | // Severity. | ||
13 | |||
14 | @@ -100,6 +103,7 @@ | ||
15 | type serverConn interface { | ||
16 | writeString(p Priority, hostname, tag, s, nl string) error | ||
17 | close() error | ||
18 | + setWriteDeadline(t time.Time) error | ||
19 | } | ||
20 | |||
21 | type netConn struct { | ||
22 | @@ -273,7 +277,11 @@ | ||
23 | nl = "\n" | ||
24 | } | ||
25 | |||
26 | - err := w.conn.writeString(p, w.hostname, w.tag, msg, nl) | ||
27 | + err := w.conn.setWriteDeadline(time.Now().Add(writeTimeout)) | ||
28 | + if err != nil { | ||
29 | + return 0, err | ||
30 | + } | ||
31 | + err = w.conn.writeString(p, w.hostname, w.tag, msg, nl) | ||
32 | if err != nil { | ||
33 | return 0, err | ||
34 | } | ||
35 | @@ -305,6 +313,10 @@ | ||
36 | return n.conn.Close() | ||
37 | } | ||
38 | |||
39 | +func (n *netConn) setWriteDeadline(t time.Time) error { | ||
40 | + return n.conn.SetWriteDeadline(t) | ||
41 | +} | ||
42 | + | ||
43 | // NewLogger creates a log.Logger whose output is written to | ||
44 | // the system log service with the specified priority. The logFlag | ||
45 | // argument is the flag set passed through to log.New to create | ||
46 | diff -r -u go/src/log/syslog/syslog_unix.go /home/achang/GOCOPY/go/src/log/syslog/syslog_unix.go | ||
47 | --- go/src/log/syslog/syslog_unix.go 2013-11-28 13:38:28.000000000 -0800 | ||
48 | +++ /home/achang/GOCOPY/go/src/log/syslog/syslog_unix.go 2014-10-03 11:44:39.010403175 -0700 | ||
49 | @@ -19,7 +19,7 @@ | ||
50 | logPaths := []string{"/dev/log", "/var/run/syslog"} | ||
51 | for _, network := range logTypes { | ||
52 | for _, path := range logPaths { | ||
53 | - conn, err := net.Dial(network, path) | ||
54 | + conn, err := net.DialTimeout(network, path, connectTimeout) | ||
55 | if err != nil { | ||
56 | continue | ||
57 | } else { | ||