2009-12-25 Vladimir Serbinenko <phcoder@gmail.com>
Support for (pxe[:server[:gateway]]) syntax and use environment variable for PXE. * commands/i386/pc/pxecmd.c (options): Removed. (print_ip): Removed. (grub_cmd_pxe): Removed (grub_cmd_pxe_unload): New function. * fs/i386/pc/pxe.c (grub_pxe_disk_data): New structure. (grub_pxe_your_ip): Made static. (grub_pxe_default_server_ip): Likewise. (grub_pxe_default_gateway_ip): Likewise. (grub_pxe_blksize): Likewise. (parse_ip): New function. (grub_pxe_open): Support server and gateway specification. (grub_pxe_close): Free disk->data. (grub_pxefs_open): Use disk->data. (grub_pxefs_read): Likewise. (grub_env_write_readonly): New function. (set_mac_env): Likewise. (set_env_limn_ro): Likewise. (parse_dhcp_vendor): Likewise. (grub_pxe_detect): Set the environment variables. (set_ip_env): New function. (write_ip_env): Likewise. (grub_env_write_pxe_default_server): Likewise. (grub_env_write_pxe_default_gateway): Likewise. (grub_env_write_pxe_blocksize): Likewise. (GRUB_MOD_INIT(pxe)): Set environment variables. * include/grub/i386/pc/pxe.h (grub_pxe_mac_addr): Rename to ... (grub_pxe_mac_addr_t): ... this. All users updated. (grub_pxe_your_ip): Removed. (grub_pxe_server_ip): Likewise. (grub_pxe_gateway_ip): Likewise. (grub_pxe_blksize): Likewise.
This commit is contained in:
commit
7ebaa2b4ff
4 changed files with 334 additions and 83 deletions
|
@ -201,7 +201,7 @@ struct grub_pxenv_get_cached_info
|
|||
|
||||
#define GRUB_PXE_MAC_ADDR_LEN 16
|
||||
|
||||
typedef grub_uint8_t grub_pxe_mac_addr[GRUB_PXE_MAC_ADDR_LEN];
|
||||
typedef grub_uint8_t grub_pxe_mac_addr_t[GRUB_PXE_MAC_ADDR_LEN];
|
||||
|
||||
struct grub_pxenv_boot_player
|
||||
{
|
||||
|
@ -216,7 +216,7 @@ struct grub_pxenv_boot_player
|
|||
grub_uint32_t your_ip;
|
||||
grub_uint32_t server_ip;
|
||||
grub_uint32_t gateway_ip;
|
||||
grub_pxe_mac_addr mac_addr;
|
||||
grub_pxe_mac_addr_t mac_addr;
|
||||
grub_uint8_t server_name[64];
|
||||
grub_uint8_t boot_file[128];
|
||||
union
|
||||
|
@ -306,10 +306,6 @@ struct grub_pxenv * EXPORT_FUNC(grub_pxe_scan) (void);
|
|||
int EXPORT_FUNC(grub_pxe_call) (int func, void * data);
|
||||
|
||||
extern struct grub_pxenv *grub_pxe_pxenv;
|
||||
extern grub_uint32_t grub_pxe_your_ip;
|
||||
extern grub_uint32_t grub_pxe_server_ip;
|
||||
extern grub_uint32_t grub_pxe_gateway_ip;
|
||||
extern int grub_pxe_blksize;
|
||||
|
||||
void grub_pxe_unload (void);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue