aboutsummaryrefslogtreecommitdiff
path: root/sys/boot
diff options
context:
space:
mode:
authorDoug Rabson <dfr@FreeBSD.org>2001-09-22 18:31:02 +0000
committerDoug Rabson <dfr@FreeBSD.org>2001-09-22 18:31:02 +0000
commit81d63063b18b3f01b06cbf62ec8f2d747dcf7094 (patch)
treeb32df9651cd4eb6ea376c48124c7515854ba232f /sys/boot
parent1e1a0298eeec53c527069e4a91c0cbd8984dd8c7 (diff)
Notes
Diffstat (limited to 'sys/boot')
-rw-r--r--sys/boot/efi/libefi/efifs.c21
1 files changed, 16 insertions, 5 deletions
diff --git a/sys/boot/efi/libefi/efifs.c b/sys/boot/efi/libefi/efifs.c
index 6bd2452604dd..cb3fadc0652d 100644
--- a/sys/boot/efi/libefi/efifs.c
+++ b/sys/boot/efi/libefi/efifs.c
@@ -113,12 +113,23 @@ efifs_read(struct open_file *f, void *buf, size_t size, size_t *resid)
EFI_FILE *file = f->f_fsdata;
EFI_STATUS status;
UINTN sz = size;
+ char *bufp;
- status = file->Read(file, &sz, buf);
- if (EFI_ERROR(status))
- return EIO;
-
- *resid = size - sz;
+ bufp = buf;
+ while (size > 0) {
+ sz = size;
+ if (sz > 8192)
+ sz = 8192;
+ status = file->Read(file, &sz, bufp);
+ twiddle();
+ if (EFI_ERROR(status))
+ return EIO;
+ if (sz == 0)
+ break;
+ size -= sz;
+ bufp += sz;
+ }
+ *resid = size;
return 0;
}