Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

main.c 1.1KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /**************************************************************************
  2. iPXE - Network Bootstrap Program
  3. Literature dealing with the network protocols:
  4. ARP - RFC826
  5. RARP - RFC903
  6. UDP - RFC768
  7. BOOTP - RFC951, RFC2132 (vendor extensions)
  8. DHCP - RFC2131, RFC2132 (options)
  9. TFTP - RFC1350, RFC2347 (options), RFC2348 (blocksize), RFC2349 (tsize)
  10. RPC - RFC1831, RFC1832 (XDR), RFC1833 (rpcbind/portmapper)
  11. **************************************************************************/
  12. FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
  13. #include <stddef.h>
  14. #include <stdio.h>
  15. #include <ipxe/init.h>
  16. #include <ipxe/version.h>
  17. #include <usr/autoboot.h>
  18. /**
  19. * Main entry point
  20. *
  21. * @ret rc Return status code
  22. */
  23. __asmcall int main ( void ) {
  24. int rc;
  25. /* Perform one-time-only initialisation (e.g. heap) */
  26. initialise();
  27. /* Some devices take an unreasonably long time to initialise */
  28. printf ( "%s initialising devices...", product_short_name );
  29. startup();
  30. printf ( "ok\n" );
  31. /* Attempt to boot */
  32. if ( ( rc = ipxe ( NULL ) ) != 0 )
  33. goto err_ipxe;
  34. err_ipxe:
  35. shutdown_exit();
  36. return rc;
  37. }