2 * Copyright (C) 2010 Michael Brown <mbrown@fensystems.co.uk>.
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.
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.
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
22 #include <ipxe/command.h>
23 #include <ipxe/parseopt.h>
24 #include <ipxe/netdevice.h>
25 #include <hci/ifmgmt_cmd.h>
26 #include <usr/autoboot.h>
28 FILE_LICENCE ( GPL2_OR_LATER );
36 /** "autoboot" options */
37 struct autoboot_options {};
39 /** "autoboot" option list */
40 static struct option_descriptor autoboot_opts[] = {};
45 * @v netdev Network device
46 * @v opts Command options
47 * @ret rc Return status code
49 static int autoboot_payload ( struct net_device *netdev,
50 struct autoboot_options *opts __unused ) {
51 return netboot ( netdev );
54 /** "autoboot" command descriptor */
55 static struct ifcommon_command_descriptor autoboot_cmd =
56 IFCOMMON_COMMAND_DESC ( struct autoboot_options, autoboot_opts,
57 0, MAX_ARGUMENTS, "[<interface>...]",
58 autoboot_payload, 0 );
63 * @v argc Argument count
64 * @v argv Argument list
65 * @ret rc Return status code
67 static int autoboot_exec ( int argc, char **argv ) {
68 return ifcommon_exec ( argc, argv, &autoboot_cmd );
71 /** Booting commands */
72 struct command autoboot_commands[] __command = {
75 .exec = autoboot_exec,