forked from jaypipes/ghw
-
Notifications
You must be signed in to change notification settings - Fork 0
/
path_linux.go
58 lines (44 loc) · 1.45 KB
/
path_linux.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
// 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 (
"path/filepath"
)
func (ctx *context) pathVarLog() string {
return filepath.Join(ctx.chroot, "var", "log")
}
func (ctx *context) pathProcMeminfo() string {
return filepath.Join(ctx.chroot, "proc", "meminfo")
}
func (ctx *context) pathSysKernelMMHugepages() string {
return filepath.Join(ctx.chroot, "sys", "kernel", "mm", "hugepages")
}
func (ctx *context) pathProcCpuinfo() string {
return filepath.Join(ctx.chroot, "proc", "cpuinfo")
}
func (ctx *context) pathEtcMtab() string {
return filepath.Join(ctx.chroot, "etc", "mtab")
}
func (ctx *context) pathSysBlock() string {
return filepath.Join(ctx.chroot, "sys", "block")
}
func (ctx *context) pathSysDevicesSystemNode() string {
return filepath.Join(ctx.chroot, "sys", "devices", "system", "node")
}
func (ctx *context) pathSysBusPciDevices() string {
return filepath.Join(ctx.chroot, "sys", "bus", "pci", "devices")
}
func (ctx *context) pathSysClassDrm() string {
return filepath.Join(ctx.chroot, "sys", "class", "drm")
}
func (ctx *context) pathSysClassDMI() string {
return filepath.Join(ctx.chroot, "sys", "class", "dmi")
}
func (ctx *context) pathSysClassNet() string {
return filepath.Join(ctx.chroot, "sys", "class", "net")
}
func (ctx *context) pathRunUdevData() string {
return filepath.Join(ctx.chroot, "run", "udev", "data")
}