diff options
| author | Marcel Moolenaar <marcel@FreeBSD.org> | 2003-02-26 09:13:05 +0000 |
|---|---|---|
| committer | Marcel Moolenaar <marcel@FreeBSD.org> | 2003-02-26 09:13:05 +0000 |
| commit | 21c598caae022ef87f7c54396a5afca1bb99cb15 (patch) | |
| tree | 8f0c3b5e43a21b2308c1e8c38b1188e4e7a59067 | |
| parent | 96dfe788adb097af6513edc2b512d932b1d4cb53 (diff) | |
Notes
| -rw-r--r-- | sys/boot/efi/libefi/efifs.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/sys/boot/efi/libefi/efifs.c b/sys/boot/efi/libefi/efifs.c index d42bc71b952e..ce76e707822b 100644 --- a/sys/boot/efi/libefi/efifs.c +++ b/sys/boot/efi/libefi/efifs.c @@ -36,6 +36,9 @@ #include <efilib.h> #include "efiboot.h" +/* Perform I/O in blocks of size EFI_BLOCK_SIZE. */ +#define EFI_BLOCK_SIZE (1024 * 1024) + static int efifs_open(const char *upath, struct open_file *f) { @@ -123,8 +126,8 @@ efifs_read(struct open_file *f, void *buf, size_t size, size_t *resid) bufp = buf; while (size > 0) { sz = size; - if (sz > 8192) - sz = 8192; + if (sz > EFI_BLOCK_SIZE) + sz = EFI_BLOCK_SIZE; status = file->Read(file, &sz, bufp); twiddle(); if (EFI_ERROR(status)) @@ -150,8 +153,8 @@ efifs_write(struct open_file *f, void *buf, size_t size, size_t *resid) bufp = buf; while (size > 0) { sz = size; - if (sz > 8192) - sz = 8192; + if (sz > EFI_BLOCK_SIZE) + sz = EFI_BLOCK_SIZE; status = file->Write(file, &sz, bufp); twiddle(); if (EFI_ERROR(status)) |
