1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-15 10:17:20 +00:00

Add a twiddle meter when reading from files. Gives me something to look

at when a kernel is loading from a floppy.
This commit is contained in:
Doug Rabson 2001-09-22 18:31:02 +00:00
parent 1e1a0298ee
commit 81d63063b1
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=83824

View File

@ -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;
}