您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

boot_cmd.c 345B

123456789101112131415161718192021
  1. #include <vsprintf.h>
  2. #include <gpxe/command.h>
  3. #include <gpxe/autoboot.h>
  4. static int boot_exec ( int argc, char **argv ) {
  5. if ( argc != 1 ) {
  6. printf ( "Usage: %s\n"
  7. "Attempts to boot the system\n", argv[0] );
  8. return 1;
  9. }
  10. autoboot();
  11. return 0;
  12. }
  13. struct command boot_command __command = {
  14. .name = "boot",
  15. .exec = boot_exec,
  16. };