Adding upstream version 1.34.4.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
e393c3af3f
commit
4978089aab
4963 changed files with 677545 additions and 0 deletions
19
internal/env.go
Normal file
19
internal/env.go
Normal file
|
@ -0,0 +1,19 @@
|
|||
package internal
|
||||
|
||||
import "os"
|
||||
|
||||
// GetProcPath returns the path stored in HOST_PROC env variable, or /proc if HOST_PROC has not been set.
|
||||
func GetProcPath() string {
|
||||
if hostProc := os.Getenv("HOST_PROC"); hostProc != "" {
|
||||
return hostProc
|
||||
}
|
||||
return "/proc"
|
||||
}
|
||||
|
||||
// GetSysPath returns the path stored in HOST_SYS env variable, or /sys if HOST_SYS has not been set.
|
||||
func GetSysPath() string {
|
||||
if hostSys := os.Getenv("HOST_SYS"); hostSys != "" {
|
||||
return hostSys
|
||||
}
|
||||
return "/sys"
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue