From 83baabeaf5b79c3fcf2a0d21bbd136c0b0f07480 Mon Sep 17 00:00:00 2001 From: Aaron Jacobs Date: Tue, 19 May 2015 16:05:01 +1000 Subject: [PATCH] Added ReadSymlinkOp. --- fuseops/ops.go | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/fuseops/ops.go b/fuseops/ops.go index 117aae4..3b2e6dd 100644 --- a/fuseops/ops.go +++ b/fuseops/ops.go @@ -886,3 +886,25 @@ type unknownOp struct { func (o *unknownOp) toBazilfuseResponse() (bfResp interface{}) { panic(fmt.Sprintf("Should never get here for unknown op: %s", o.ShortDesc())) } + +//////////////////////////////////////////////////////////////////////// +// Reading symlinks +//////////////////////////////////////////////////////////////////////// + +// Read the target of a symlink inode. +type ReadSymlinkOp struct { + commonOp + + // The symlink inode that we are reading. + Inode InodeID + + // Set by the file system: the target of the symlink. + Target string +} + +func (o *ReadSymlinkOp) toBazilfuseResponse() (bfResp interface{}) { + resp := o.Target + bfResp = &resp + + return +}