http://git.etherboot.org
/
people
/
cooldavid
/
gpxe.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[dhcp] Add generic facility for using cached network settings
[people/cooldavid/gpxe.git]
/
src
/
usr
/
dhcpmgmt.c
diff --git
a/src/usr/dhcpmgmt.c
b/src/usr/dhcpmgmt.c
index
aa96985
..
f82a3bb
100644
(file)
--- a/
src/usr/dhcpmgmt.c
+++ b/
src/usr/dhcpmgmt.c
@@
-55,8
+55,13
@@
int dhcp ( struct net_device *netdev ) {
printf ( "DHCP (%s ", netdev->name );
while ( hlen-- )
printf ( "%02x%c", *(chaddr++), ( hlen ? ':' : ')' ) );
printf ( "DHCP (%s ", netdev->name );
while ( hlen-- )
printf ( "%02x%c", *(chaddr++), ( hlen ? ':' : ')' ) );
- if ( ( rc = start_dhcp ( &monojob, netdev ) ) == 0 )
+
+ if ( ( rc = start_dhcp ( &monojob, netdev ) ) == 0 ) {
rc = monojob_wait ( "" );
rc = monojob_wait ( "" );
+ } else if ( rc > 0 ) {
+ printf ( " using cached\n" );
+ rc = 0;
+ }
return rc;
}
return rc;
}