iPXE
Functions
efi_autoexec.h File Reference

EFI autoexec script. More...

#include <ipxe/efi/efi.h>

Go to the source code of this file.

Functions

 FILE_LICENCE (GPL2_OR_LATER_OR_UBDL)
 
int efi_autoexec_load (EFI_HANDLE device)
 Load autoexec script. More...
 

Detailed Description

EFI autoexec script.

Definition in file efi_autoexec.h.

Function Documentation

◆ FILE_LICENCE()

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL  )

◆ efi_autoexec_load()

int efi_autoexec_load ( EFI_HANDLE  device)

Load autoexec script.

Parameters
deviceDevice handle
Return values
rcReturn status code

Definition at line 350 of file efi_autoexec.c.

350  {
351  int rc;
352 
353  /* Sanity check */
354  assert ( efi_autoexec == NULL );
355  assert ( efi_autoexec_len == 0 );
356 
357  /* Try loading from file system, if supported */
358  if ( ( rc = efi_autoexec_filesystem ( device ) ) == 0 )
359  return 0;
360 
361  /* Try loading via TFTP, if supported */
362  if ( ( rc = efi_autoexec_tftp ( device ) ) == 0 )
363  return 0;
364 
365  return -ENOENT;
366 }
static size_t efi_autoexec_len
Autoexec script length.
Definition: efi_autoexec.c:54
struct arbelprm_rc_send_wqe rc
Definition: arbel.h:14
#define ENOENT
No such file or directory.
Definition: errno.h:514
static int efi_autoexec_tftp(EFI_HANDLE device)
Load autoexec script from TFTP server.
Definition: efi_autoexec.c:181
A hardware device.
Definition: device.h:73
assert((readw(&hdr->flags) &(GTF_reading|GTF_writing))==0)
static int efi_autoexec_filesystem(EFI_HANDLE device)
Load autoexec script from filesystem.
Definition: efi_autoexec.c:62
static void * efi_autoexec
Autoexec script (if any)
Definition: efi_autoexec.c:51
#define NULL
NULL pointer (VOID *)
Definition: Base.h:362

References assert(), efi_autoexec, efi_autoexec_filesystem(), efi_autoexec_len, efi_autoexec_tftp(), ENOENT, NULL, and rc.

Referenced by efi_init_application().