Page MenuHomeFreeBSD

D35432.id107159.diff
No OneTemporary

D35432.id107159.diff

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

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)

Event Timeline