diff options
Diffstat (limited to 'sys/boot/common')
-rw-r--r-- | sys/boot/common/dev_net.c | 6 | ||||
-rw-r--r-- | sys/boot/common/disk.c | 2 | ||||
-rw-r--r-- | sys/boot/common/disk.h | 1 | ||||
-rw-r--r-- | sys/boot/common/gpt.c | 2 | ||||
-rw-r--r-- | sys/boot/common/gpt.h | 2 |
5 files changed, 10 insertions, 3 deletions
diff --git a/sys/boot/common/dev_net.c b/sys/boot/common/dev_net.c index 873b28d..ed07a2c 100644 --- a/sys/boot/common/dev_net.c +++ b/sys/boot/common/dev_net.c @@ -169,6 +169,12 @@ net_open(struct open_file *f, ...) setenv("boot.netif.gateway", inet_ntoa(gateip), 1); setenv("boot.nfsroot.server", inet_ntoa(rootip), 1); setenv("boot.nfsroot.path", rootpath, 1); + if (intf_mtu != 0) { + char mtu[16]; + sprintf(mtu, "%u", intf_mtu); + setenv("boot.netif.mtu", mtu, 1); + } + } netdev_opens++; f->f_devdata = &netdev_sock; diff --git a/sys/boot/common/disk.c b/sys/boot/common/disk.c index a8801e1..c862d30 100644 --- a/sys/boot/common/disk.c +++ b/sys/boot/common/disk.c @@ -170,7 +170,7 @@ display_size(uint64_t size, u_int sectorsize) return (buf); } -static int +int ptblread(void *d, void *buf, size_t blocks, off_t offset) { struct disk_devdesc *dev; diff --git a/sys/boot/common/disk.h b/sys/boot/common/disk.h index e95256d..d24fb1a 100644 --- a/sys/boot/common/disk.h +++ b/sys/boot/common/disk.h @@ -107,6 +107,7 @@ extern int disk_read(struct disk_devdesc *dev, void *buf, off_t offset, u_int blocks); extern int disk_write(struct disk_devdesc *dev, void *buf, off_t offset, u_int blocks); +extern int ptblread(void *d, void *buf, size_t blocks, off_t offset); /* * Print information about slices on a disk. diff --git a/sys/boot/common/gpt.c b/sys/boot/common/gpt.c index 8baa64c..7ab3fc6 100644 --- a/sys/boot/common/gpt.c +++ b/sys/boot/common/gpt.c @@ -39,8 +39,6 @@ __FBSDID("$FreeBSD$"); #include "util.h" #include "gpt.h" -#define MAXTBLENTS 128 - static struct gpt_hdr hdr_primary, hdr_backup, *gpthdr; static uint64_t hdr_primary_lba, hdr_backup_lba; static struct gpt_ent table_primary[MAXTBLENTS], table_backup[MAXTBLENTS]; diff --git a/sys/boot/common/gpt.h b/sys/boot/common/gpt.h index c42b40d..9d48564 100644 --- a/sys/boot/common/gpt.h +++ b/sys/boot/common/gpt.h @@ -32,6 +32,8 @@ #include <uuid.h> #include <drv.h> +#define MAXTBLENTS 128 + int gptread(const uuid_t *uuid, struct dsk *dskp, char *buf); int gptfind(const uuid_t *uuid, struct dsk *dskp, int part); void gptbootfailed(struct dsk *dskp); |