hst/fs: implement link fstype

Symlinks do not require special treatment, and doing this allows placing links in order.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2025-08-25 21:31:45 +09:00
parent 125f150784
commit 26cafe3e80
4 changed files with 126 additions and 0 deletions

View File

@@ -95,6 +95,12 @@ func (f *FilesystemConfigJSON) MarshalJSON() ([]byte, error) {
*FSOverlay
}{fsType{FilesystemOverlay}, cv}
case *FSLink:
v = &struct {
fsType
*FSLink
}{fsType{FilesystemLink}, cv}
default:
return nil, FSImplError{f.FilesystemConfig}
}
@@ -120,6 +126,9 @@ func (f *FilesystemConfigJSON) UnmarshalJSON(data []byte) error {
case FilesystemOverlay:
*f = FilesystemConfigJSON{new(FSOverlay)}
case FilesystemLink:
*f = FilesystemConfigJSON{new(FSLink)}
default:
return FSTypeError(t.Type)
}