← Commit list

28a6afe97

Eric Andersen
Eric Andersen
2006-03-20
SOURCE BUG Duration: 18s

Subject

Roy Walker writes:

SOURCE BUG

This commit was genuinely broken at the time (not related to our build system): scripts/config/mkconfigs.c (2005-08-01 - 2006-10-05 arasi) uretilen bbconfigopts.h icine .config satirlarini kacissiz, ham newline'larla gömüyordu - gecerli C degildi, busybox'un kendi bb_mkdep araci bile parse edemiyordu (7d219aab7 ile duzeltildi, mkconfigs shell scripte cevrildi)

→ Bu hatanin tam hikayesini ve duzeltme diffini gor

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

networking/udhcp/dhcpc.c+9 -2
@@ -59,6 +59,7 @@ struct client_config_t client_config = {
.fqdn = NULL,
.ifindex = 0,
.retries = 3,
+ .timeout = 3,
.arp = "\0\0\0\0\0\0", /* appease gcc-3.0 */
};
@@ -84,6 +85,8 @@ static void ATTRIBUTE_NORETURN show_usage(void)
" -r, --request=IP IP address to request (default: none)\n"
" -s, --script=file Run file at dhcp events (default:\n"
" " DEFAULT_SCRIPT ")\n"
+" -T, --timeout=seconds Try to get the lease for the amount of\n"
+" seconds (default: 3)\n"
" -v, --version Display version\n"
);
exit(0);
@@ -202,6 +205,7 @@ int main(int argc, char *argv[])
{"quit", no_argument, 0, 'q'},
{"request", required_argument, 0, 'r'},
{"script", required_argument, 0, 's'},
+ {"timeout", required_argument, 0, 'T'},
{"version", no_argument, 0, 'v'},
{"retries", required_argument, 0, 't'},
{0, 0, 0, 0}
@@ -210,7 +214,7 @@ int main(int argc, char *argv[])
/* get options */
while (1) {
int option_index = 0;
- c = getopt_long(argc, argv, "c:CV:fbH:h:F:i:np:qr:s:t:v", arg_options, &option_index);
+ c = getopt_long(argc, argv, "c:CV:fbH:h:F:i:np:qr:s:T:t:v", arg_options, &option_index);
if (c == -1) break;
switch (c) {
@@ -286,6 +290,9 @@ int main(int argc, char *argv[])
case 's':
client_config.script = optarg;
break;
+ case 'T':
+ client_config.timeout = atoi(optarg);
+ break;
case 't':
client_config.retries = atoi(optarg);
break;
@@ -365,7 +372,7 @@ int main(int argc, char *argv[])
/* send discover packet */
send_discover(xid, requested_ip); /* broadcast */
- timeout = now + ((packet_num == 2) ? 4 : 2);
+ timeout = now + client_config.timeout;
packet_num++;
} else {
run_script(NULL, "leasefail");
networking/udhcp/dhcpc.h+1 -0
@@ -30,6 +30,7 @@ struct client_config_t {
uint8_t *fqdn; /* Optional fully qualified domain name to use */
int ifindex; /* Index number of the interface to use */
int retries; /* Max number of request packets */
+ int timeout; /* Number of seconds to try to get a lease */
uint8_t arp[6]; /* Our arp address */
};