summaryrefslogtreecommitdiffstats
path: root/sys/boot/efi
diff options
context:
space:
mode:
authordfr <dfr@FreeBSD.org>2001-09-22 18:31:02 +0000
committerdfr <dfr@FreeBSD.org>2001-09-22 18:31:02 +0000
commitfb20752c1ac4b114e72701633cbcdc8caf60ba11 (patch)
treeb32df9651cd4eb6ea376c48124c7515854ba232f /sys/boot/efi
parent69d68ac34b943b6146bd104de03a5d4224456680 (diff)
downloadFreeBSD-src-fb20752c1ac4b114e72701633cbcdc8caf60ba11.zip
FreeBSD-src-fb20752c1ac4b114e72701633cbcdc8caf60ba11.tar.gz
Add a twiddle meter when reading from files. Gives me something to look
at when a kernel is loading from a floppy.
Diffstat (limited to 'sys/boot/efi')
-rw-r--r--sys/boot/efi/libefi/efifs.c23
1 files changed, 17 insertions, 6 deletions
diff --git a/sys/boot/efi/libefi/efifs.c b/sys/boot/efi/libefi/efifs.c
index 6bd2452..cb3fadc 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;
-
- status = file->Read(file, &sz, buf);
- if (EFI_ERROR(status))
- return EIO;
-
- *resid = size - sz;
+ char *bufp;
+
+ 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;
}
OpenPOWER on IntegriCloud