aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/system/tmpfiles.go
diff options
context:
space:
mode:
authorOphestra Umiker <cat@ophivana.moe>2024-10-16 14:38:57 +0900
committerOphestra Umiker <cat@ophivana.moe>2024-10-16 14:38:57 +0900
commitc21168a74181903535c63f49c5a6d3bd2052c883 (patch)
tree6ed272c6a4d3712624077cf39794d7d1eb22295f /internal/system/tmpfiles.go
parent084cd84f36a1d608541b4aa4e1e95334395d8953 (diff)
system: move enablements from state package
This removes the unnecessary import of the state package. Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
Diffstat (limited to 'internal/system/tmpfiles.go')
-rw-r--r--internal/system/tmpfiles.go11
1 files changed, 5 insertions, 6 deletions
diff --git a/internal/system/tmpfiles.go b/internal/system/tmpfiles.go
index 2a9f724a..ba25e077 100644
--- a/internal/system/tmpfiles.go
+++ b/internal/system/tmpfiles.go
@@ -9,7 +9,6 @@ import (
"git.ophivana.moe/cat/fortify/acl"
"git.ophivana.moe/cat/fortify/internal/fmsg"
- "git.ophivana.moe/cat/fortify/internal/state"
"git.ophivana.moe/cat/fortify/internal/verbose"
)
@@ -19,7 +18,7 @@ func (sys *I) CopyFile(dst, src string) {
}
// CopyFileType registers a file copying Op labelled with type et.
-func (sys *I) CopyFileType(et state.Enablement, dst, src string) {
+func (sys *I) CopyFileType(et Enablement, dst, src string) {
sys.lock.Lock()
sys.ops = append(sys.ops, &Tmpfile{et, tmpfileCopy, dst, src})
sys.lock.Unlock()
@@ -33,7 +32,7 @@ func (sys *I) Link(oldname, newname string) {
}
// LinkFileType registers a file linking Op labelled with type et.
-func (sys *I) LinkFileType(et state.Enablement, oldname, newname string) {
+func (sys *I) LinkFileType(et Enablement, oldname, newname string) {
sys.lock.Lock()
defer sys.lock.Unlock()
@@ -46,7 +45,7 @@ func (sys *I) Write(dst, src string) {
}
// WriteType registers a file writing Op labelled with type et.
-func (sys *I) WriteType(et state.Enablement, dst, src string) {
+func (sys *I) WriteType(et Enablement, dst, src string) {
sys.lock.Lock()
sys.ops = append(sys.ops, &Tmpfile{et, tmpfileWrite, dst, src})
sys.lock.Unlock()
@@ -61,12 +60,12 @@ const (
)
type Tmpfile struct {
- et state.Enablement
+ et Enablement
method uint8
dst, src string
}
-func (t *Tmpfile) Type() state.Enablement {
+func (t *Tmpfile) Type() Enablement {
return t.et
}