Skip to content

Commit

Permalink
fix copying of files
Browse files Browse the repository at this point in the history
* You'd think that GRUB would increment the file offset automatically...
  but you'd be wrong.
  • Loading branch information
pbatard committed Jun 30, 2014
1 parent 1a2a730 commit 5cfbf1b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/fs_driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,9 @@ FileRead(EFI_FILE_HANDLE This, UINTN *Len, VOID *Data)
return EFI_DEVICE_ERROR;
}

/* You'd think that GRUB read() would increase the offset... */
File->grub_file.offset += len;

*Len = len;
return EFI_SUCCESS;
}
Expand Down
2 changes: 1 addition & 1 deletion src/fs_driver.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

/* Driver version */
#define FS_DRIVER_VERSION_MAJOR 0
#define FS_DRIVER_VERSION_MINOR 4
#define FS_DRIVER_VERSION_MINOR 4b

#undef offsetof
#if defined(__GNUC__) && (__GNUC__ > 3)
Expand Down

0 comments on commit 5cfbf1b

Please sign in to comment.