Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F145114290
D35432.id107159.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
434 B
Referenced Files
None
Subscribers
None
D35432.id107159.diff
View Options
diff --git a/stand/userboot/test/test.c b/stand/userboot/test/test.c
--- a/stand/userboot/test/test.c
+++ b/stand/userboot/test/test.c
@@ -254,6 +254,11 @@
if (unit > disk_index || disk_fd[unit] == -1)
return (EIO);
n = pread(disk_fd[unit], dst, size, offset);
+ if (n == 0) {
+ printf("%s: end of disk (%ju)\n", __func__, (intmax_t)offset);
+ return (EIO);
+ }
+
if (n < 0)
return (errno);
*resid_return = size - n;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Feb 17, 3:08 AM (3 h, 16 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28798995
Default Alt Text
D35432.id107159.diff (434 B)
Attached To
Mode
D35432: test_diskread(): detect end of the disk
Attached
Detach File
Event Timeline
Log In to Comment