mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-25 08:39:28 +00:00
add a new command tftpserver.
This commit is contained in:
1 parent
83038ffbbc
commit
7ca6bf9d91
6 files changed
+62
-4
No files matched your search
@@ -2943,6 +2943,35 @@ static struct builtin builtin_testload =
|
||||
" step is to try loading a kernel."
|
||||
};
|
||||
|
||||
|
||||
/* tftpserver */
|
||||
static int
|
||||
tftpserver_func (char *arg, int flags)
|
||||
{
|
||||
#ifdef SUPPORT_NETBOOT
|
||||
if (! *arg || ! arp_server_override (arg))
|
||||
{
|
||||
errnum = ERR_BAD_ARGUMENT;
|
||||
return 1;
|
||||
}
|
||||
|
||||
print_network_configuration ();
|
||||
return 0;
|
||||
#else
|
||||
errnum = ERR_UNRECOGNIZED;
|
||||
return 1;
|
||||
#endif
|
||||
}
|
||||
|
||||
static struct builtin builtin_tftpserver =
|
||||
{
|
||||
"tftpserver",
|
||||
tftpserver_func,
|
||||
BUILTIN_CMDLINE | BUILTIN_MENU,
|
||||
"tftpserver IPADDR",
|
||||
"Override the TFTP server address."
|
||||
};
|
||||
|
||||
|
||||
/* timeout */
|
||||
static int
|
||||
@@ -3077,6 +3106,7 @@ struct builtin *builtin_table[] =
|
||||
&builtin_setkey,
|
||||
&builtin_setup,
|
||||
&builtin_testload,
|
||||
&builtin_tftpserver,
|
||||
&builtin_timeout,
|
||||
&builtin_title,
|
||||
&builtin_unhide,
|
||||
|
||||
Reference in new issue
Block a user