|
|
|
syscall: fix Getfsstat() for BSD
The buffer length should be the size in bytes
instead of the number of structs.
Fixes issue 6588.
Patch Set 1 #Patch Set 2 : diff -r 88b3b2fa4dde https://code.google.com/p/go #Patch Set 3 : diff -r 88b3b2fa4dde https://code.google.com/p/go #Patch Set 4 : diff -r 519230b4d06a https://code.google.com/p/go #
Total comments: 4
Patch Set 5 : diff -r 519230b4d06a https://code.google.com/p/go #
Total messages: 9
|
pcj
Hello golang-codereviews@googlegroups.com, I'd like you to review this change to https://code.google.com/p/go
|
11 years, 9 months ago (2014年04月05日 18:10:53 UTC) #1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Hello golang-codereviews@googlegroups.com, I'd like you to review this change to https://code.google.com/p/go
please add a new test case for Getfsstat into the new file syscall_bsd_test.go, thanks.
Hello golang-codereviews@googlegroups.com, mikioh.mikioh@gmail.com (cc: golang-codereviews@googlegroups.com), Please take another look.
Please see http://golang.org/doc/contribute.html#copyright and proceed the process w/ project owner's help. https://codereview.appspot.com/84830043/diff/60001/src/pkg/syscall/syscall_bs... File src/pkg/syscall/syscall_bsd_test.go (right): https://codereview.appspot.com/84830043/diff/60001/src/pkg/syscall/syscall_bs... src/pkg/syscall/syscall_bsd_test.go:5: // +build freebsd dragonfly darwin openbsd alphanumeric order pls https://codereview.appspot.com/84830043/diff/60001/src/pkg/syscall/syscall_bs... src/pkg/syscall/syscall_bsd_test.go:15: n, err := syscall.Getfsstat(nil, 1 /* MNT_WAIT */) const MNT_WAIT = 1 is fine https://codereview.appspot.com/84830043/diff/60001/src/pkg/syscall/syscall_bs... src/pkg/syscall/syscall_bsd_test.go:17: t.Fatalf("Getfsstat: %v", err) you can just write t.Fatal(err); i mean, looks like people loves a concise style even in test cases recently. https://codereview.appspot.com/84830043/diff/60001/src/pkg/syscall/syscall_bs... src/pkg/syscall/syscall_bsd_test.go:29: t.Fatal("An empty Statfs_t struct was returned.") perhaps s/An/an/ because testing package will add a prefix appropriately.
Hello golang-codereviews@googlegroups.com, mikioh.mikioh@gmail.com (cc: golang-codereviews@googlegroups.com), Please take another look.
LGTM adg: could you please help him for signing off?
On 7 April 2014 12:08, Mikio Hara <mikioh.mikioh@gmail.com> wrote: > adg: could you please help him for signing off? Yep already on it.
*** Submitted as https://code.google.com/p/go/source/detail?r=6c4e0c99f534 *** syscall: fix Getfsstat() for BSD The buffer length should be the size in bytes instead of the number of structs. Fixes issue 6588. LGTM=mikioh.mikioh R=golang-codereviews, mikioh.mikioh, adg CC=golang-codereviews https://codereview.appspot.com/84830043 Committer: Andrew Gerrand <adg@golang.org>
This CL appears to have broken the openbsd-386-rootbsd builder. See http://build.golang.org/log/96fedbf1789e282ac86669e47a6aabdee11e1f3b