Added FUSE support #55

Merged
Elara6331 merged 65 commits from yannickulrich/itd:fuse into master 2023-03-25 22:23:52 +00:00
1 changed files with 3 additions and 1 deletions
Showing only changes of commit 2c899b4660 - Show all commits

View File

@ -251,7 +251,9 @@ type sensorFileReadHandle struct {
}
var _ = (fs.FileReader)((*sensorFileReadHandle)(nil))
func (fh *sensorFileReadHandle) Read(ctx context.Context, dest []byte, off int64) (fuse.ReadResult, syscall.Errno) {
return nil, 0
v := <-fh.ch
content := []byte(strconv.Itoa(int(v)) + "\n")
return fuse.ReadResultData(content), 0
}