Commit 82e5e42f authored by Han-Wen Nienhuys's avatar Han-Wen Nienhuys

fuse: document two functions

parent 116a24d5
...@@ -30,7 +30,8 @@ func (code Status) Ok() bool { ...@@ -30,7 +30,8 @@ func (code Status) Ok() bool {
return code == OK return code == OK
} }
// Convert error back to Errno based errors. // ToStatus extracts an errno number from Go error objects. If it
// fails, it logs an error and returns ENOSYS.
func ToStatus(err error) Status { func ToStatus(err error) Status {
switch err { switch err {
case nil: case nil:
......
...@@ -226,6 +226,7 @@ func (f *FallocateIn) string() string { ...@@ -226,6 +226,7 @@ func (f *FallocateIn) string() string {
f.Fh, f.Offset, f.Length, f.Mode) f.Fh, f.Offset, f.Length, f.Mode)
} }
// Print pretty prints FUSE data types for kernel communication
func Print(obj interface{}) string { func Print(obj interface{}) string {
t, ok := obj.(interface { t, ok := obj.(interface {
string() string string() string
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment