From e9a72490db44426605debd3cc756a7924931d706 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Tue, 17 Mar 2026 15:16:46 +0900 Subject: [PATCH] vfs: move from container This package is not container-specific. Signed-off-by: Ophestra --- container/container_test.go | 2 +- container/errors.go | 2 +- container/errors_test.go | 2 +- container/mount.go | 2 +- container/mount_test.go | 2 +- container/path.go | 2 +- container/path_test.go | 2 +- internal/pkg/testdata/main.go | 2 +- {container/vfs => vfs}/mangle.go | 0 {container/vfs => vfs}/mangle_test.go | 2 +- {container/vfs => vfs}/mountinfo.go | 0 {container/vfs => vfs}/mountinfo_test.go | 2 +- {container/vfs => vfs}/unfold.go | 0 {container/vfs => vfs}/unfold_test.go | 2 +- 14 files changed, 11 insertions(+), 11 deletions(-) rename {container/vfs => vfs}/mangle.go (100%) rename {container/vfs => vfs}/mangle_test.go (94%) rename {container/vfs => vfs}/mountinfo.go (100%) rename {container/vfs => vfs}/mountinfo_test.go (99%) rename {container/vfs => vfs}/unfold.go (100%) rename {container/vfs => vfs}/unfold_test.go (99%) diff --git a/container/container_test.go b/container/container_test.go index 65a620e..a5ca11a 100644 --- a/container/container_test.go +++ b/container/container_test.go @@ -24,11 +24,11 @@ import ( "hakurei.app/container/fhs" "hakurei.app/container/seccomp" "hakurei.app/container/std" - "hakurei.app/container/vfs" "hakurei.app/ext" "hakurei.app/hst" "hakurei.app/ldd" "hakurei.app/message" + "hakurei.app/vfs" ) // Note: this package requires cgo, which is unavailable in the Go playground. diff --git a/container/errors.go b/container/errors.go index 150dcd1..7c45037 100644 --- a/container/errors.go +++ b/container/errors.go @@ -6,8 +6,8 @@ import ( "syscall" "hakurei.app/container/check" - "hakurei.app/container/vfs" "hakurei.app/message" + "hakurei.app/vfs" ) // messageFromError returns a printable error message for a supported concrete type. diff --git a/container/errors_test.go b/container/errors_test.go index 71b4a9a..a7a1bb8 100644 --- a/container/errors_test.go +++ b/container/errors_test.go @@ -10,7 +10,7 @@ import ( "hakurei.app/container/check" "hakurei.app/container/stub" - "hakurei.app/container/vfs" + "hakurei.app/vfs" ) func TestMessageFromError(t *testing.T) { diff --git a/container/mount.go b/container/mount.go index 360a71d..171b210 100644 --- a/container/mount.go +++ b/container/mount.go @@ -6,8 +6,8 @@ import ( "os" . "syscall" - "hakurei.app/container/vfs" "hakurei.app/message" + "hakurei.app/vfs" ) /* diff --git a/container/mount_test.go b/container/mount_test.go index aca6467..ffacf18 100644 --- a/container/mount_test.go +++ b/container/mount_test.go @@ -6,7 +6,7 @@ import ( "testing" "hakurei.app/container/stub" - "hakurei.app/container/vfs" + "hakurei.app/vfs" ) func TestBindMount(t *testing.T) { diff --git a/container/path.go b/container/path.go index 965ad49..80c64b2 100644 --- a/container/path.go +++ b/container/path.go @@ -10,7 +10,7 @@ import ( "syscall" "hakurei.app/container/fhs" - "hakurei.app/container/vfs" + "hakurei.app/vfs" ) const ( diff --git a/container/path_test.go b/container/path_test.go index d175455..b0ec464 100644 --- a/container/path_test.go +++ b/container/path_test.go @@ -11,7 +11,7 @@ import ( "unsafe" "hakurei.app/container/check" - "hakurei.app/container/vfs" + "hakurei.app/vfs" ) func TestToSysroot(t *testing.T) { diff --git a/internal/pkg/testdata/main.go b/internal/pkg/testdata/main.go index ad047a2..f013f08 100644 --- a/internal/pkg/testdata/main.go +++ b/internal/pkg/testdata/main.go @@ -14,7 +14,7 @@ import ( "hakurei.app/container/check" "hakurei.app/container/fhs" - "hakurei.app/container/vfs" + "hakurei.app/vfs" ) func main() { diff --git a/container/vfs/mangle.go b/vfs/mangle.go similarity index 100% rename from container/vfs/mangle.go rename to vfs/mangle.go diff --git a/container/vfs/mangle_test.go b/vfs/mangle_test.go similarity index 94% rename from container/vfs/mangle_test.go rename to vfs/mangle_test.go index 0227e8e..91abdb3 100644 --- a/container/vfs/mangle_test.go +++ b/vfs/mangle_test.go @@ -3,7 +3,7 @@ package vfs_test import ( "testing" - "hakurei.app/container/vfs" + "hakurei.app/vfs" ) func TestUnmangle(t *testing.T) { diff --git a/container/vfs/mountinfo.go b/vfs/mountinfo.go similarity index 100% rename from container/vfs/mountinfo.go rename to vfs/mountinfo.go diff --git a/container/vfs/mountinfo_test.go b/vfs/mountinfo_test.go similarity index 99% rename from container/vfs/mountinfo_test.go rename to vfs/mountinfo_test.go index 65d062e..2b6254c 100644 --- a/container/vfs/mountinfo_test.go +++ b/vfs/mountinfo_test.go @@ -13,7 +13,7 @@ import ( "syscall" "testing" - "hakurei.app/container/vfs" + "hakurei.app/vfs" ) func TestDecoderError(t *testing.T) { diff --git a/container/vfs/unfold.go b/vfs/unfold.go similarity index 100% rename from container/vfs/unfold.go rename to vfs/unfold.go diff --git a/container/vfs/unfold_test.go b/vfs/unfold_test.go similarity index 99% rename from container/vfs/unfold_test.go rename to vfs/unfold_test.go index 3e9d270..642cc02 100644 --- a/container/vfs/unfold_test.go +++ b/vfs/unfold_test.go @@ -6,7 +6,7 @@ import ( "strings" "testing" - "hakurei.app/container/vfs" + "hakurei.app/vfs" ) func TestUnfold(t *testing.T) {