Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 120968 Details for
Bug 178756
sys-kernel/genkernel-3.4.8 problems with network boot (nfsroot=)
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch busybox: reintroduce -R as -O
busybox_udhcp_add_-O_option.patch (text/plain), 4.49 KB, created by
Stefan Hellermann
on 2007-06-02 18:19:34 UTC
(
hide
)
Description:
patch busybox: reintroduce -R as -O
Filename:
MIME Type:
Creator:
Stefan Hellermann
Created:
2007-06-02 18:19:34 UTC
Size:
4.49 KB
patch
obsolete
>--- busybox-1.5.0/networking/udhcp/options.c 2007-03-22 21:21:23.000000000 +0100 >+++ busybox-1.5.0_new/networking/udhcp/options.c 2007-06-02 19:50:44.000000000 +0200 >@@ -10,7 +10,7 @@ > > > /* supported options are easily added here */ >-const struct dhcp_option dhcp_options[] = { >+struct dhcp_option dhcp_options[] = { > /* name[12] flags code */ > {"subnet", OPTION_IP | OPTION_REQ, 0x01}, > {"timezone", OPTION_S32, 0x02}, >@@ -67,7 +67,19 @@ const unsigned char option_lengths[] = { > [OPTION_S32] = 4 > }; > >- >+/* find and mark requested item as required */ >+int require_option(char *name) >+{ >+ int i; >+ for (i = 0; dhcp_options[i].code; i++) { >+ if( strcmp( name, dhcp_options[i].name ) == 0 ){ >+ dhcp_options[i].flags |= OPTION_REQ; >+ return 0; >+ } >+ } >+ return 1; >+} >+ > /* get an option with bounds checking (warning, not aligned). */ > uint8_t *get_option(struct dhcpMessage *packet, int code) > { >--- busybox-1.5.0/networking/udhcp/options.h 2007-03-22 21:21:23.000000000 +0100 >+++ busybox-1.5.0_new/networking/udhcp/options.h 2007-06-02 19:51:40.000000000 +0200 >@@ -29,9 +29,10 @@ struct dhcp_option { > uint8_t code; > }; > >-extern const struct dhcp_option dhcp_options[]; >+extern struct dhcp_option dhcp_options[]; > extern const unsigned char option_lengths[]; > >+int require_option(char *name); > uint8_t *get_option(struct dhcpMessage *packet, int code); > int end_option(uint8_t *optionptr); > int add_option_string(uint8_t *optionptr, uint8_t *string); >--- busybox-1.5.0/networking/udhcp/dhcpc.c 2007-03-22 21:21:23.000000000 +0100 >+++ busybox-1.5.0_new/networking/udhcp/dhcpc.c 2007-06-02 19:47:13.000000000 +0200 >@@ -126,7 +126,7 @@ int udhcpc_main(int argc, char *argv[]); > int udhcpc_main(int argc, char *argv[]) > { > uint8_t *temp, *message; >- char *str_c, *str_V, *str_h, *str_F, *str_r, *str_T, *str_t; >+ char *str_c, *str_V, *str_h, *str_F, *str_r, *str_T, *str_t, *str_O; > unsigned long t1 = 0, t2 = 0, xid = 0; > unsigned long start = 0, lease = 0; > long now; >@@ -160,6 +160,7 @@ int udhcpc_main(int argc, char *argv[]) > OPT_T = 1 << 15, > OPT_t = 1 << 16, > OPT_v = 1 << 17, >+ OPT_O = 1 << 18, > }; > #if ENABLE_GETOPT_LONG > static const struct option arg_options[] = { >@@ -173,6 +174,7 @@ int udhcpc_main(int argc, char *argv[]) > { "fqdn", required_argument, 0, 'F' }, > { "interface", required_argument, 0, 'i' }, > { "now", no_argument, 0, 'n' }, >+ { "request-option", required_argument, 0, 'O' }, > { "pidfile", required_argument, 0, 'p' }, > { "quit", no_argument, 0, 'q' }, > { "release", no_argument, 0, 'R' }, >@@ -196,10 +198,10 @@ int udhcpc_main(int argc, char *argv[]) > #if ENABLE_GETOPT_LONG > applet_long_options = arg_options; > #endif >- opt = getopt32(argc, argv, "c:CV:fbH:h:F:i:np:qRr:s:T:t:v", >+ opt = getopt32(argc, argv, "c:CV:fbH:h:F:i:np:qRr:s:T:t:vO", > &str_c, &str_V, &str_h, &str_h, &str_F, > &client_config.interface, &client_config.pidfile, &str_r, >- &client_config.script, &str_T, &str_t >+ &client_config.script, &str_T, &str_t, &str_O > ); > > if (opt & OPT_c) >@@ -244,6 +246,11 @@ int udhcpc_main(int argc, char *argv[]) > if (opt & OPT_v) { > printf("version %s\n\n", BB_VER); > return 0; >+ if (opt & OPT_O) >+ if (require_option(str_O)) { >+ printf("Option: %s unknown/not-supported\n", str_O); >+ return 1; >+ } > } > > /* Start the log, sanitize fd's, and write a pid file */ >--- busybox-1.5.0/include/usage.h 2007-03-22 21:21:35.000000000 +0100 >+++ busybox-1.5.0_new/include/usage.h 2007-06-02 20:08:51.000000000 +0200 >@@ -3410,7 +3410,7 @@ > "Adjust filesystem options on ext[23] filesystems" > > #define udhcpc_trivial_usage \ >- "[-Cfbnqtv] [-c CID] [-V VCLS] [-H HOSTNAME] [-i INTERFACE]\n[-p pidfile] [-r IP] [-s script]" >+ "[-Cfbnqtv] [-c CID] [-V VCLS] [-H HOSTNAME] [-i INTERFACE]\n[-p pidfile] [-r IP] [-s script] [-O dhcp-option]" > #define udhcpc_full_usage \ > " -V,--vendorclass=CLASSID Set vendor class identifier\n" \ > " -i,--interface=INTERFACE Interface to use (default: eth0)\n" \ >@@ -3426,7 +3426,8 @@ > " -n,--now Exit with failure if lease cannot be immediately negotiated\n" \ > " -q,--quit Quit after obtaining lease\n" \ > " -R,--release Release IP on quit\n" \ >- " -v,--version Display version" \ >+ " -v,--version Display version\n" \ >+ " -O,--request-option=NAME Request also NAME DHCP-Option" \ > > #define udhcpd_trivial_usage \ > "[configfile]\n" \
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 178756
:
120949
|
120955
|
120968
|
120971
|
120976
|
124306