diff options
| author | Barret Rhoden <brho@google.com> | 2026-07-02 09:09:32 +0000 |
|---|---|---|
| committer | Dominique Martinet <asmadeus@codewreck.org> | 2026-10-29 06:01:10 +0000 |
| commit | a3a6212c7d67baebebd0e4c2cf2ae1b75eb9231e (patch) | |
| tree | fb77be0e2744ec0e0097605b278a5346feb6b71c /scripts/basic | |
| parent | 9b4cf60c6b739461c5b4ec9c52587da6b2608786 (diff) | |
| download | linux-a3a6212c7d67baebebd0e4c2cf2ae1b75eb9231e.tar.gz linux-a3a6212c7d67baebebd0e4c2cf2ae1b75eb9231e.zip | |
9p: treat read return values of 0 as EOF
If your 9p server shares a synthetic file system such as sysfs, the file
size from stat often disagrees with the actual file size.
Treat non-error reads of 0 as EOF, except in the case where the request
was for 0 bytes.
Tested:
git@github.com:hugelgupf/p9.git, served "/" on 10.0.2.2
bash-5.3# mount -t 9p -o trans=tcp,port=12345,cache=none 10.0.2.2 /tmp/foo
bash-5.3# cat /tmp/foo/sys/devices/system/cpu/online
0-47
Fixes: eb497943fa21 ("9p: Convert to using the netfs helper lib to do reads and caching")
Signed-off-by: Barret Rhoden <brho@google.com>
Message-ID: <20260702090941.1298188-1-brho@google.com>
Signed-off-by: Dominique Martinet <asmadeus@codewreck.org>
Diffstat (limited to 'scripts/basic')
0 files changed, 0 insertions, 0 deletions
