nfsmount,serve nfs: introduce symlink support #2975

This commit is contained in:
Nick Craig-Wood 2024-10-20 17:46:42 +01:00
parent 5700d04116
commit ee73cc1aa5

View File

@ -142,16 +142,16 @@ func (f *FS) Lstat(filename string) (fi os.FileInfo, err error) {
return fi, nil
}
// Symlink is not supported over NFS
// Symlink creates a link pointing to target
func (f *FS) Symlink(target, link string) (err error) {
defer log.Trace(target, "link=%q", link)("err=%v", &err)
return os.ErrInvalid
return f.vfs.Symlink(target, link)
}
// Readlink is not supported
// Readlink reads the contents of link
func (f *FS) Readlink(link string) (result string, err error) {
defer log.Trace(link, "")("result=%q, err=%v", &result, &err)
return "", os.ErrInvalid
return f.vfs.Readlink(link)
}
// Chmod changes the file modes