]> code.delx.au - refind/blobdiff - filesystems/fsw_efi.c
Another round of changes to clear lintian issues.
[refind] / filesystems / fsw_efi.c
index bb82a8845376197981ab70818efa8f88a7adf0f3..878d106d72716be719e8b206a6c975df8007b243 100644 (file)
@@ -102,10 +102,10 @@ EFI_STATUS EFIAPI fsw_efi_ComponentName_GetControllerName(IN  EFI_COMPONENT_NAME
                                                           IN  CHAR8                          *Language,
                                                           OUT CHAR16                         **ControllerName);
 
-void fsw_efi_change_blocksize(struct fsw_volume *vol,
+void EFIAPI fsw_efi_change_blocksize(struct fsw_volume *vol,
                               fsw_u32 old_phys_blocksize, fsw_u32 old_log_blocksize,
                               fsw_u32 new_phys_blocksize, fsw_u32 new_log_blocksize);
-fsw_status_t fsw_efi_read_block(struct fsw_volume *vol, fsw_u64 phys_bno, void *buffer);
+fsw_status_t EFIAPI fsw_efi_read_block(struct fsw_volume *vol, fsw_u64 phys_bno, void *buffer);
 
 EFI_STATUS fsw_efi_map_status(fsw_status_t fsw_status, FSW_VOLUME_DATA *Volume);
 
@@ -498,7 +498,7 @@ EFI_STATUS EFIAPI fsw_efi_ComponentName_GetControllerName(IN  EFI_COMPONENT_NAME
  * when the file system driver changes the block sizes for the volume.
  */
 
-void fsw_efi_change_blocksize(struct fsw_volume *vol,
+void EFIAPI fsw_efi_change_blocksize(struct fsw_volume *vol,
                               fsw_u32 old_phys_blocksize, fsw_u32 old_log_blocksize,
                               fsw_u32 new_phys_blocksize, fsw_u32 new_log_blocksize)
 {
@@ -516,7 +516,7 @@ void fsw_efi_change_blocksize(struct fsw_volume *vol,
  * disk.
  */
 
-fsw_status_t fsw_efi_read_block(struct fsw_volume *vol, fsw_u64 phys_bno, void *buffer) {
+fsw_status_t EFIAPI fsw_efi_read_block(struct fsw_volume *vol, fsw_u64 phys_bno, void *buffer) {
    int              i, ReadCache = -1;
    FSW_VOLUME_DATA  *Volume = (FSW_VOLUME_DATA *)vol->host_data;
    EFI_STATUS       Status = EFI_SUCCESS;
@@ -557,7 +557,11 @@ fsw_status_t fsw_efi_read_block(struct fsw_volume *vol, fsw_u64 phys_bno, void *
          // compiled with Tianocore. Further clue: Omitting "Status =" avoids the
          // hang but produces a failure to mount the filesystem, even when the same
          // change is made to later similar call. Calling Volume->DiskIo->ReadDisk()
-         // directly (without refit_call5_wrapper()) changes nothing. FIGURE THIS OUT!
+         // directly (without refit_call5_wrapper()) changes nothing. Placing Print()
+         // statements at the start and end of the function, and before and after the
+         // ReadDisk() call, suggests that when it fails, the program is executing
+         // code starting mid-function, so there seems to be something messed up in
+         // the way the function is being called. FIGURE THIS OUT!
          Status = refit_call5_wrapper(Volume->DiskIo->ReadDisk, Volume->DiskIo, Volume->MediaId,
                                       StartRead, (UINTN) CACHE_SIZE, (VOID*) Caches[ReadCache].Cache);
          if (!EFI_ERROR(Status)) {