Commit b590d66
committed
lfs_fuse_bd: Exit when read syscall returns 0
We do an assert check before lseek that the block we are reading
from is valid. read() syscalls only return 0 to signal EOF. This
is not going to happen with valid blocks.
This happens when block device has disconnected. In this case,
ignoring the 0 return value causes littlefs_fuse to remain stuck
in an infinite loop, and the overlying program and shell accessing
the LittleFS mount to be stuck in an uninterruptible sleep.
Signed-off-by: Utsav Munendra <[email protected]>1 parent 38cf2b5 commit b590d66
1 file changed
+2
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
| 86 | + | |
| 87 | + | |
86 | 88 | | |
87 | 89 | | |
88 | 90 | | |
| |||
0 commit comments