forked from jaypipes/ghw
-
Notifications
You must be signed in to change notification settings - Fork 0
/
block_stub.go
81 lines (62 loc) · 1.32 KB
/
block_stub.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
// +build !linux
// Use and distribution licensed under the Apache license version 2.
//
// See the COPYING file in the root project directory for full text.
//
package ghw
import (
"runtime"
"github.com/pkg/errors"
)
func blockFillInfo(info *BlockInfo) error {
return errors.New("blockFillInfo not implemented on " + runtime.GOOS)
}
func DiskPhysicalBlockSizeBytes(disk string) uint64 {
return 0
}
func DiskSizeBytes(disk string) uint64 {
return 0
}
func DiskNUMANodeID(disk string) int {
return -1
}
func DiskVendor(disk string) string {
return UNKNOWN
}
func DiskModel(disk string) string {
return UNKNOWN
}
func DiskSerialNumber(disk string) string {
return UNKNOWN
}
func DiskBusPath(disk string) string {
return UNKNOWN
}
func DiskWWN(disk string) string {
return UNKNOWN
}
func DiskPartitions(disk string) []*Partition {
return nil
}
func Disks() []*Disk {
return nil
}
func PartitionSizeBytes(part string) uint64 {
return 0
}
func PartitionInfo(part string) (string, string, bool) {
// full name, short name, read-only
return "", "", true
}
func PartitionMountPoint(part string) string {
mp, _, _ := PartitionInfo(part)
return mp
}
func PartitionType(part string) string {
_, pt, _ := PartitionInfo(part)
return pt
}
func PartitionIsReadOnly(part string) bool {
_, _, ro := PartitionInfo(part)
return ro
}