aboutsummaryrefslogtreecommitdiffhomepage
path: root/fhs/abs.go
blob: ce2ae34d83c8bb6a02ee3399b264418ce2cbc12a (plain)
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
package fhs

import (
	_ "unsafe" // for go:linkname

	"hakurei.app/check"
)

/* constants in this file bypass abs check, be extremely careful when changing them! */

// unsafeAbs returns check.Absolute on any string value.
//
//go:linkname unsafeAbs hakurei.app/check.unsafeAbs
func unsafeAbs(pathname string) *check.Absolute

var (
	// AbsRoot is [Root] as [check.Absolute].
	AbsRoot = unsafeAbs(Root)
	// AbsEtc is [Etc] as [check.Absolute].
	AbsEtc = unsafeAbs(Etc)
	// AbsTmp is [Tmp] as [check.Absolute].
	AbsTmp = unsafeAbs(Tmp)

	// AbsRun is [Run] as [check.Absolute].
	AbsRun = unsafeAbs(Run)
	// AbsRunUser is [RunUser] as [check.Absolute].
	AbsRunUser = unsafeAbs(RunUser)

	// AbsUsr is [Usr] as [check.Absolute].
	AbsUsr = unsafeAbs(Usr)
	// AbsUsrBin is [UsrBin] as [check.Absolute].
	AbsUsrBin = unsafeAbs(UsrBin)

	// AbsVar is [Var] as [check.Absolute].
	AbsVar = unsafeAbs(Var)
	// AbsVarLib is [VarLib] as [check.Absolute].
	AbsVarLib = unsafeAbs(VarLib)

	// AbsDev is [Dev] as [check.Absolute].
	AbsDev = unsafeAbs(Dev)
	// AbsDevShm is [DevShm] as [check.Absolute].
	AbsDevShm = unsafeAbs(DevShm)
	// AbsProc is [Proc] as [check.Absolute].
	AbsProc = unsafeAbs(Proc)
	// AbsProcSelfExe is [ProcSelfExe] as [check.Absolute].
	AbsProcSelfExe = unsafeAbs(ProcSelfExe)
	// AbsSys is [Sys] as [check.Absolute].
	AbsSys = unsafeAbs(Sys)
)