Skip to content

Commit

Permalink
[disk]freebsd: update 386.
Browse files Browse the repository at this point in the history
  • Loading branch information
shirou committed Apr 23, 2016
1 parent 01832c6 commit e864f2a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
6 changes: 5 additions & 1 deletion disk/disk_freebsd_386.go
Expand Up @@ -39,6 +39,10 @@ const (
MNT_SUSPEND = 4
)

const (
sizeOfDevstat = 0xf0
)

type (
_C_short int16
_C_int int32
Expand Down Expand Up @@ -95,7 +99,7 @@ type Devstat struct {
Flags uint32
Device_type uint32
Priority uint32
ID *byte
Id *byte
Sequence1 uint32
}
type Bintime struct {
Expand Down
5 changes: 4 additions & 1 deletion disk/disk_test.go
Expand Up @@ -26,6 +26,9 @@ func TestDisk_partitions(t *testing.T) {
t.Errorf("error %v", err)
}
empty := PartitionStat{}
if len(ret) == 0 {
t.Errorf("ret is empty")
}
for _, disk := range ret {
if disk == empty {
t.Errorf("Could not get device info %v", disk)
Expand All @@ -39,7 +42,7 @@ func TestDisk_io_counters(t *testing.T) {
t.Errorf("error %v", err)
}
if len(ret) == 0 {
t.Errorf("ret is empty, %v", ret)
t.Errorf("ret is empty")
}
empty := IOCountersStat{}
for part, io := range ret {
Expand Down
3 changes: 3 additions & 0 deletions host/host_test.go
Expand Up @@ -32,6 +32,9 @@ func TestUsers(t *testing.T) {
t.Errorf("error %v", err)
}
empty := UserStat{}
if len(v) == 0 {
t.Errorf("Users is empty")
}
for _, u := range v {
if u == empty {
t.Errorf("Could not Users %v", v)
Expand Down

0 comments on commit e864f2a

Please sign in to comment.