Reorder some calls in C prototypes to match what assembly programs are doing.
This commit is contained in:
parent
35dbae15a0
commit
d39dbc3484
|
@ -19,6 +19,13 @@ efi_status_t efi_main(efi_handle_t image_handle, struct efi_system_table *system
|
|||
system->boot->open_protocol(image_handle, &guid1, (void **) &image, image_handle, 0,
|
||||
EFI_OPEN_PROTOCOL_BY_HANDLE_PROTOCOL);
|
||||
|
||||
/* Get root file system */
|
||||
efi_handle_t root_device = image->device;
|
||||
system->boot->open_protocol(root_device, &guid2, (void **) &rootfs, image_handle, 0,
|
||||
EFI_OPEN_PROTOCOL_BY_HANDLE_PROTOCOL);
|
||||
/* Get root directory */
|
||||
rootfs->open_volume(rootfs, &rootdir);
|
||||
|
||||
/* Command line args */
|
||||
uint16_t *options = image->load_options;
|
||||
uint16_t *in;
|
||||
|
@ -33,13 +40,6 @@ efi_status_t efi_main(efi_handle_t image_handle, struct efi_system_table *system
|
|||
*options = 0;
|
||||
out = ++options;
|
||||
|
||||
/* Get root file system */
|
||||
efi_handle_t root_device = image->device;
|
||||
system->boot->open_protocol(root_device, &guid2, (void **) &rootfs, image_handle, 0,
|
||||
EFI_OPEN_PROTOCOL_BY_HANDLE_PROTOCOL);
|
||||
/* Get root directory */
|
||||
rootfs->open_volume(rootfs, &rootdir);
|
||||
|
||||
/* Open file for writing */
|
||||
struct efi_file_protocol *fout;
|
||||
rootdir->open(rootdir, &fout, out, EFI_FILE_MODE_CREATE| EFI_FILE_MODE_WRITE | EFI_FILE_MODE_READ, 0);
|
||||
|
|
|
@ -356,6 +356,13 @@ efi_status_t efi_main(efi_handle_t image_handle, struct efi_system_table *system
|
|||
boot->open_protocol(image_handle, &guid1, (void **) &image, image_handle, 0,
|
||||
EFI_OPEN_PROTOCOL_BY_HANDLE_PROTOCOL);
|
||||
|
||||
/* Get root file system */
|
||||
efi_handle_t root_device = image->device;
|
||||
boot->open_protocol(root_device, &guid2, (void **) &rootfs, image_handle, 0,
|
||||
EFI_OPEN_PROTOCOL_BY_HANDLE_PROTOCOL);
|
||||
/* Get root directory */
|
||||
rootfs->open_volume(rootfs, &rootdir);
|
||||
|
||||
/* Command line args */
|
||||
uint16_t *options = image->load_options;
|
||||
uint16_t *in;
|
||||
|
@ -370,12 +377,6 @@ efi_status_t efi_main(efi_handle_t image_handle, struct efi_system_table *system
|
|||
*options = 0;
|
||||
out = ++options;
|
||||
|
||||
/* Get root file system */
|
||||
efi_handle_t root_device = image->device;
|
||||
boot->open_protocol(root_device, &guid2, (void **) &rootfs, image_handle, 0,
|
||||
EFI_OPEN_PROTOCOL_BY_HANDLE_PROTOCOL);
|
||||
/* Get root directory */
|
||||
rootfs->open_volume(rootfs, &rootdir);
|
||||
|
||||
/* Open file for writing */
|
||||
struct efi_file_protocol *fout;
|
||||
|
|
|
@ -29,6 +29,13 @@ efi_status_t efi_main(efi_handle_t image_handle, struct efi_system_table *system
|
|||
system->boot->open_protocol(image_handle, &guid1, (void **) &image, image_handle, 0,
|
||||
EFI_OPEN_PROTOCOL_BY_HANDLE_PROTOCOL);
|
||||
|
||||
/* Get root file system */
|
||||
efi_handle_t root_device = image->device;
|
||||
system->boot->open_protocol(root_device, &guid2, (void **) &rootfs, image_handle, 0,
|
||||
EFI_OPEN_PROTOCOL_BY_HANDLE_PROTOCOL);
|
||||
/* Get root directory */
|
||||
rootfs->open_volume(rootfs, &rootdir);
|
||||
|
||||
/* Command line args */
|
||||
uint16_t *options = image->load_options;
|
||||
uint16_t default_file[] = L"kaem.amd64";
|
||||
|
@ -44,13 +51,6 @@ efi_status_t efi_main(efi_handle_t image_handle, struct efi_system_table *system
|
|||
script_file = ++options;
|
||||
}
|
||||
|
||||
/* Get root file system */
|
||||
efi_handle_t root_device = image->device;
|
||||
system->boot->open_protocol(root_device, &guid2, (void **) &rootfs, image_handle, 0,
|
||||
EFI_OPEN_PROTOCOL_BY_HANDLE_PROTOCOL);
|
||||
/* Get root directory */
|
||||
rootfs->open_volume(rootfs, &rootdir);
|
||||
|
||||
/* Open file for reading */
|
||||
struct efi_file_protocol *fin;
|
||||
efi_status_t status = rootdir->open(rootdir, &fin, script_file, EFI_FILE_MODE_READ, EFI_FILE_READ_ONLY);
|
||||
|
|
Loading…
Reference in New Issue