Displaying 8 results from an estimated 8 matches for "add_one_dev".
2004 May 28
1
ipconfig related question (do not get static IP setting)
Hi!! I found your ipconfig stuff in the udev rpm in SuSE 9.1. I'm about to
setup a initramfs (pretty cool - much better than initrd) to boot linux
diskless clients over the net. All the tools I would need, seem to be
there with ipconfig/nfsmount ...
I like to use the information I get from PXE/syslinux or Etherboot
writing something like:
2011 Jul 08
4
[PATCH 0/4] usr/kinit checkpatch
Various coding style fixes checkpatch warns about.
The goal is not to be 100% checkpatch compliant,
but to have more consistent coding style.
As this is a trivial patch serie, will land in 24 hours in klibc git,
unless of course ml review hits a bugger.
Checked with size(3) that the generated kinit, fstype, ipconfig and
nfsmount are the same.
maximilian attems (4):
[klibc] ipconfig: reduce
2003 Apr 29
0
[PATCH] ipconfig: fix memory leak, and exit if no interfaces to configure
...(netdev_init_if(dev) == -1)
- return;
+ goto bail;
if (bootp_init_if(dev) == -1)
- return;
+ goto bail;
printf("IP-Config: %s hardware address", dev->name);
for (i = 0; i < dev->hwlen; i++)
@@ -406,6 +406,22 @@
if (dev->caps && netdev_up(dev) == 0)
add_one_dev(dev);
+ return;
+ bail:
+ free(dev);
+}
+
+static void check_for_devs(void)
+{
+ struct state *s;
+
+ for (s = slist; s; s = s->next) {
+ if (s->dev->caps)
+ return;
+ }
+
+ fprintf(stderr, "%s: no devices to configure\n", progname);
+ exit(1);
}
int main(int argc, char *...
2010 Aug 24
0
[PATCH]: Exiting -1 if dhcp client failed
...onse after %d "
"secs - giving up\n", loop_timeout);
+ return_code=-1;
goto bail;
}
-410,7 +412,7 @@ static int loop(void)
bail:
packet_close();
- return 0;
+ return return_code;
}
static int add_one_dev(struct netdev *dev)
-724,7 +726,7 @@ int ipconfig_main(int argc, char *argv[])
{
struct netdev *dev;
int c, port;
- int err;
+ int err=0;
/* If progname is set we're invoked from another program */
if (!progname) {
-740,6 +742,9 @@ int ipconfig_main(int argc, char...
2017 Feb 04
0
[PATCH] ipconfig: handle multiple interfaces correctly
...&& do_pkt_recv(nr, fds, now.tv_sec))
+ break;
if (loop_timeout >= 0 &&
now.tv_sec - start >= loop_timeout) {
@@ -468,8 +473,8 @@ static int loop(void)
}
}
bail:
- packet_close();
-
+ if (fds)
+ free(fds);
return rc;
}
@@ -498,6 +503,8 @@ static int add_one_dev(struct netdev *dev)
state->next = slist;
slist = state;
+ n_devices++;
+
return 0;
}
@@ -675,6 +682,9 @@ static struct netdev *add_device(const char *info)
if (bootp_init_if(dev) == -1)
goto bail;
+ if (packet_open(dev) == -1)
+ goto bail;
+
printf("IP-Config: %s hardwa...
2019 Jan 18
0
[klibc:master] ipconfig: handle multiple interfaces correctly
...&& do_pkt_recv(nr, fds, now.tv_sec))
+ break;
if (loop_timeout >= 0 &&
now.tv_sec - start >= loop_timeout) {
@@ -468,8 +473,8 @@ static int loop(void)
}
}
bail:
- packet_close();
-
+ if (fds)
+ free(fds);
return rc;
}
@@ -498,6 +503,8 @@ static int add_one_dev(struct netdev *dev)
state->next = slist;
slist = state;
+ n_devices++;
+
return 0;
}
@@ -675,6 +682,9 @@ static struct netdev *add_device(const char *info)
if (bootp_init_if(dev) == -1)
goto bail;
+ if (packet_open(dev) == -1)
+ goto bail;
+
printf("IP-Config: %s hardwa...
2010 Aug 25
0
[patch] ipconfig fixes + run-init nit
...start >= loop_timeout) {
printf("IP-Config: no response after %d "
"secs - giving up\n", loop_timeout);
+ rc = -1;
goto bail;
}
@@ -410,7 +411,7 @@ static int loop(void)
bail:
packet_close();
- return 0;
+ return rc;
}
static int add_one_dev(struct netdev *dev)
@@ -724,7 +725,7 @@ int ipconfig_main(int argc, char *argv[])
{
struct netdev *dev;
int c, port;
- int err;
+ int err = 0;
/* If progname is set we're invoked from another program */
if (!progname) {
@@ -802,8 +803,8 @@ int ipconfig_main(int argc, char *argv[])...
2017 Dec 31
4
[PATCH klibc 0/4] Fixes from Debian and Ubuntu
The following patches come from Debian and/or Ubuntu packages of
klibc.
Ben.
Ben Hutchings (1):
[klibc] run-init: Add dry-run mode
Jay Vosburgh (1):
[klibc] ipconfig: Use separate sockets for DHCP from multiple
interfaces
Mathieu Trudel-Lapierre (1):
[klibc] ipconfig: Set broadcast when sending DHCPREQUEST and
DHCPDISCOVER
YunQiang Su (1):
[klibc] mips: setjmp.S: don't