Commit c56bb1d2 authored by Anthony Martin's avatar Anthony Martin

syscall: fix marshaling of stat messages on Plan 9

The order of the Qid fields was reversed. Mea culpa.

R=seed
CC=golang-dev
https://golang.org/cl/7231062
parent 92e4645f
...@@ -68,9 +68,9 @@ func (d *Dir) Marshal(b []byte) (n int, err error) { ...@@ -68,9 +68,9 @@ func (d *Dir) Marshal(b []byte) (n int, err error) {
b = pbit16(b, uint16(n)-2) b = pbit16(b, uint16(n)-2)
b = pbit16(b, d.Type) b = pbit16(b, d.Type)
b = pbit32(b, d.Dev) b = pbit32(b, d.Dev)
b = pbit64(b, d.Qid.Path)
b = pbit32(b, d.Qid.Vers)
b = pbit8(b, d.Qid.Type) b = pbit8(b, d.Qid.Type)
b = pbit32(b, d.Qid.Vers)
b = pbit64(b, d.Qid.Path)
b = pbit32(b, d.Mode) b = pbit32(b, d.Mode)
b = pbit32(b, d.Atime) b = pbit32(b, d.Atime)
b = pbit32(b, d.Mtime) b = pbit32(b, d.Mtime)
...@@ -101,9 +101,9 @@ func UnmarshalDir(b []byte) (*Dir, error) { ...@@ -101,9 +101,9 @@ func UnmarshalDir(b []byte) (*Dir, error) {
var d Dir var d Dir
d.Type, b = gbit16(b) d.Type, b = gbit16(b)
d.Dev, b = gbit32(b) d.Dev, b = gbit32(b)
d.Qid.Path, b = gbit64(b)
d.Qid.Vers, b = gbit32(b)
d.Qid.Type, b = gbit8(b) d.Qid.Type, b = gbit8(b)
d.Qid.Vers, b = gbit32(b)
d.Qid.Path, b = gbit64(b)
d.Mode, b = gbit32(b) d.Mode, b = gbit32(b)
d.Atime, b = gbit32(b) d.Atime, b = gbit32(b)
d.Mtime, b = gbit32(b) d.Mtime, b = gbit32(b)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment