You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

autoboot_cmd.c 1.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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., 675 Mass Ave, Cambridge, MA 02139, USA.
  17. */
  18. #include <stdio.h>
  19. #include <getopt.h>
  20. #include <ipxe/command.h>
  21. #include <ipxe/parseopt.h>
  22. #include <ipxe/netdevice.h>
  23. #include <hci/ifmgmt_cmd.h>
  24. #include <usr/autoboot.h>
  25. FILE_LICENCE ( GPL2_OR_LATER );
  26. /** @file
  27. *
  28. * Booting commands
  29. *
  30. */
  31. /** "autoboot" command descriptor */
  32. static struct command_descriptor autoboot_cmd =
  33. COMMAND_DESC ( struct ifcommon_options, ifcommon_opts, 0, MAX_ARGUMENTS,
  34. "[<interface>...]" );
  35. /**
  36. * "autoboot" command
  37. *
  38. * @v argc Argument count
  39. * @v argv Argument list
  40. * @ret rc Return status code
  41. */
  42. static int autoboot_exec ( int argc, char **argv ) {
  43. return ifcommon_exec ( argc, argv, &autoboot_cmd, netboot, 0 );
  44. }
  45. /** Booting commands */
  46. struct command autoboot_commands[] __command = {
  47. {
  48. .name = "autoboot",
  49. .exec = autoboot_exec,
  50. },
  51. };