選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

autoboot_cmd.c 1.5KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /*
  2. * Copyright (C) 2010 Michael Brown <mbrown@fensystems.co.uk>.
  3. *
  4. * This program is free software; you can redistribute it and/or
  5. * modify it under the terms of the GNU General Public License as
  6. * published by the Free Software Foundation; either version 2 of the
  7. * License, or any later version.
  8. *
  9. * This program is distributed in the hope that it will be useful, but
  10. * WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  12. * General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License
  15. * along with this program; if not, write to the Free Software
  16. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
  17. * 02110-1301, USA.
  18. */
  19. #include <stdio.h>
  20. #include <getopt.h>
  21. #include <ipxe/command.h>
  22. #include <ipxe/parseopt.h>
  23. #include <ipxe/netdevice.h>
  24. #include <hci/ifmgmt_cmd.h>
  25. #include <usr/autoboot.h>
  26. FILE_LICENCE ( GPL2_OR_LATER );
  27. /** @file
  28. *
  29. * Booting commands
  30. *
  31. */
  32. /** "autoboot" command descriptor */
  33. static struct command_descriptor autoboot_cmd =
  34. COMMAND_DESC ( struct ifcommon_options, ifcommon_opts, 0, MAX_ARGUMENTS,
  35. "[<interface>...]" );
  36. /**
  37. * "autoboot" command
  38. *
  39. * @v argc Argument count
  40. * @v argv Argument list
  41. * @ret rc Return status code
  42. */
  43. static int autoboot_exec ( int argc, char **argv ) {
  44. return ifcommon_exec ( argc, argv, &autoboot_cmd, netboot, 0 );
  45. }
  46. /** Booting commands */
  47. struct command autoboot_commands[] __command = {
  48. {
  49. .name = "autoboot",
  50. .exec = autoboot_exec,
  51. },
  52. };