diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-08-16 02:06:41 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-08-16 02:06:41 +0900 |
| commit | 8dd3e1ee5d10c150f58e3b49771d3ca847f6d4cf (patch) | |
| tree | 08c0c6812d34da419cd06323073989fb7b8d0c21 /internal/app | |
| parent | 4ffeec3004607b76f73e504da220a1490c598348 (diff) | |
hst/fs: rename method Target to Path
This allows adapter structs to use the same field names as Op structs.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/app')
| -rw-r--r-- | internal/app/app_nixos_linux_test.go | 22 | ||||
| -rw-r--r-- | internal/app/seal_linux.go | 6 |
2 files changed, 14 insertions, 14 deletions
diff --git a/internal/app/app_nixos_linux_test.go b/internal/app/app_nixos_linux_test.go index d762ca0c..16ac2a23 100644 --- a/internal/app/app_nixos_linux_test.go +++ b/internal/app/app_nixos_linux_test.go @@ -29,17 +29,17 @@ var testCasesNixos = []sealTestCase{ Container: &hst.ContainerConfig{ Userns: true, Net: true, MapRealUID: true, Env: nil, AutoEtc: true, Filesystem: []hst.FilesystemConfigJSON{ - f(&hst.FSBind{Src: m("/bin")}), - f(&hst.FSBind{Src: m("/usr/bin/")}), - f(&hst.FSBind{Src: m("/nix/store")}), - f(&hst.FSBind{Src: m("/run/current-system")}), - f(&hst.FSBind{Src: m("/sys/block"), Optional: true}), - f(&hst.FSBind{Src: m("/sys/bus"), Optional: true}), - f(&hst.FSBind{Src: m("/sys/class"), Optional: true}), - f(&hst.FSBind{Src: m("/sys/dev"), Optional: true}), - f(&hst.FSBind{Src: m("/sys/devices"), Optional: true}), - f(&hst.FSBind{Src: m("/run/opengl-driver")}), - f(&hst.FSBind{Src: m("/dev/dri"), Device: true, Optional: true}), + f(&hst.FSBind{Source: m("/bin")}), + f(&hst.FSBind{Source: m("/usr/bin/")}), + f(&hst.FSBind{Source: m("/nix/store")}), + f(&hst.FSBind{Source: m("/run/current-system")}), + f(&hst.FSBind{Source: m("/sys/block"), Optional: true}), + f(&hst.FSBind{Source: m("/sys/bus"), Optional: true}), + f(&hst.FSBind{Source: m("/sys/class"), Optional: true}), + f(&hst.FSBind{Source: m("/sys/dev"), Optional: true}), + f(&hst.FSBind{Source: m("/sys/devices"), Optional: true}), + f(&hst.FSBind{Source: m("/run/opengl-driver")}), + f(&hst.FSBind{Source: m("/dev/dri"), Device: true, Optional: true}), }, }, SystemBus: &dbus.Config{ diff --git a/internal/app/seal_linux.go b/internal/app/seal_linux.go index d0a8a546..536bb6ad 100644 --- a/internal/app/seal_linux.go +++ b/internal/app/seal_linux.go @@ -248,15 +248,15 @@ func (seal *outcome) finalise(ctx context.Context, sys sys.State, config *hst.Co // bind GPU stuff if config.Enablements.Unwrap()&(system.EX11|system.EWayland) != 0 { - conf.Filesystem = append(conf.Filesystem, hst.FilesystemConfigJSON{FilesystemConfig: &hst.FSBind{Src: container.AbsFHSDev.Append("dri"), Device: true, Optional: true}}) + conf.Filesystem = append(conf.Filesystem, hst.FilesystemConfigJSON{FilesystemConfig: &hst.FSBind{Source: container.AbsFHSDev.Append("dri"), Device: true, Optional: true}}) } // opportunistically bind kvm - conf.Filesystem = append(conf.Filesystem, hst.FilesystemConfigJSON{FilesystemConfig: &hst.FSBind{Src: container.AbsFHSDev.Append("kvm"), Device: true, Optional: true}}) + conf.Filesystem = append(conf.Filesystem, hst.FilesystemConfigJSON{FilesystemConfig: &hst.FSBind{Source: container.AbsFHSDev.Append("kvm"), Device: true, Optional: true}}) // hide nscd from container if present nscd := container.AbsFHSVar.Append("run/nscd") if _, err := sys.Stat(nscd.String()); !errors.Is(err, fs.ErrNotExist) { - conf.Filesystem = append(conf.Filesystem, hst.FilesystemConfigJSON{FilesystemConfig: &hst.FSEphemeral{Dst: nscd}}) + conf.Filesystem = append(conf.Filesystem, hst.FilesystemConfigJSON{FilesystemConfig: &hst.FSEphemeral{Target: nscd}}) } config.Container = conf |
