Changeset View
Changeset View
Standalone View
Standalone View
head/sys/boot/common/dev_net.c
Show First 20 Lines • Show All 169 Lines • ▼ Show 20 Lines | if (netproto == NET_TFTP) { | ||||
setenv("boot.tftproot.server", inet_ntoa(rootip), 1); | setenv("boot.tftproot.server", inet_ntoa(rootip), 1); | ||||
setenv("boot.tftproot.path", rootpath, 1); | setenv("boot.tftproot.path", rootpath, 1); | ||||
} else if (netproto == NET_NFS) { | } else if (netproto == NET_NFS) { | ||||
setenv("boot.nfsroot.server", inet_ntoa(rootip), 1); | setenv("boot.nfsroot.server", inet_ntoa(rootip), 1); | ||||
setenv("boot.nfsroot.path", rootpath, 1); | setenv("boot.nfsroot.path", rootpath, 1); | ||||
} | } | ||||
if (intf_mtu != 0) { | if (intf_mtu != 0) { | ||||
char mtu[16]; | char mtu[16]; | ||||
sprintf(mtu, "%u", intf_mtu); | snprintf(mtu, sizeof(mtu), "%u", intf_mtu); | ||||
setenv("boot.netif.mtu", mtu, 1); | setenv("boot.netif.mtu", mtu, 1); | ||||
} | } | ||||
} | } | ||||
netdev_opens++; | netdev_opens++; | ||||
f->f_devdata = &netdev_sock; | f->f_devdata = &netdev_sock; | ||||
return (error); | return (error); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 199 Lines • Show Last 20 Lines |