Skip to content

Commit

Permalink
10411 loader: dev_net: correct net_open's interpretation of params
Browse files Browse the repository at this point in the history
Reviewed by: Gergő Doma <[email protected]>
Reviewed by: C Fraire <[email protected]>
Approved by: Dan McDonald <[email protected]>
  • Loading branch information
tsoome committed Feb 18, 2019
1 parent 08b0760 commit ca4fa6c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion usr/src/boot/Makefile.version
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ LOADER_VERSION = 1.1
# Use date like formatting here, YYYY.MM.DD.XX, without leading zeroes.
# The version is processed from left to right, the version number can only
# be increased.
BOOT_VERSION = $(LOADER_VERSION)-2019.01.17.1
BOOT_VERSION = $(LOADER_VERSION)-2019.02.16.1
8 changes: 5 additions & 3 deletions usr/src/boot/sys/boot/common/dev_net.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,13 +123,15 @@ net_open(struct open_file *f, ...)
{
struct iodesc *d;
va_list args;
char *devname; /* Device part of file name (or NULL). */
struct devdesc *dev;
const char *devname; /* Device part of file name (or NULL). */
int error = 0;

va_start(args, f);
devname = va_arg(args, char *);
dev = va_arg(args, struct devdesc *);
va_end(args);

devname = dev->d_dev->dv_name;
/* Before opening another interface, close the previous one first. */
if (netdev_sock >= 0 && strcmp(devname, netdev_name) != 0)
net_cleanup();
Expand All @@ -138,7 +140,7 @@ net_open(struct open_file *f, ...)
if (netdev_opens == 0) {
/* Find network interface. */
if (netdev_sock < 0) {
netdev_sock = netif_open(devname);
netdev_sock = netif_open(dev);
if (netdev_sock < 0) {
printf("net_open: netif_open() failed\n");
return (ENXIO);
Expand Down

0 comments on commit ca4fa6c

Please sign in to comment.