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)
	// AbsProcSys is [ProcSys] as [check.Absolute].
	AbsProcSys = unsafeAbs(ProcSys)
	// AbsProcSelfExe is [ProcSelfExe] as [check.Absolute].
	AbsProcSelfExe = unsafeAbs(ProcSelfExe)
	// AbsSys is [Sys] as [check.Absolute].
	AbsSys = unsafeAbs(Sys)
)
