aboutsummaryrefslogtreecommitdiff
path: root/src/net/ipv6.c
diff options
context:
space:
mode:
authorMichael Brown <mcb30@ipxe.org>2013-12-03 16:48:56 +0000
committerMichael Brown <mcb30@ipxe.org>2013-12-05 00:37:02 +0000
commit22001cb206c1320aee27f679a63d2171d35e99c5 (patch)
treea972bb914371a68d4925dcc007238dcb836546ba /src/net/ipv6.c
parenta2638a8edd28e15d90435a0b1aed9b3215666aa4 (diff)
downloadipxe-22001cb206c1320aee27f679a63d2171d35e99c5.zip
ipxe-22001cb206c1320aee27f679a63d2171d35e99c5.tar.gz
ipxe-22001cb206c1320aee27f679a63d2171d35e99c5.tar.bz2
[settings] Explicitly separate the concept of a completed fetched setting
The fetch_setting() family of functions may currently modify the definition of the specified setting (e.g. to add missing type information). Clean up this interface by requiring callers to provide an explicit buffer to contain the completed definition of the fetched setting, if required. Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/net/ipv6.c')
-rw-r--r--src/net/ipv6.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/net/ipv6.c b/src/net/ipv6.c
index b4f33f0..68a0c89 100644
--- a/src/net/ipv6.c
+++ b/src/net/ipv6.c
@@ -954,7 +954,7 @@ struct sockaddr_converter ipv6_sockaddr_converter __sockaddr_converter = {
* @v len Length of buffer
* @ret len Length of raw value, or negative error
*/
-static int parse_ipv6_setting ( struct setting_type *type __unused,
+static int parse_ipv6_setting ( const struct setting_type *type __unused,
const char *value, void *buf, size_t len ) {
struct in6_addr ipv6;
int rc;
@@ -981,7 +981,7 @@ static int parse_ipv6_setting ( struct setting_type *type __unused,
* @v len Length of buffer
* @ret len Length of formatted value, or negative error
*/
-static int format_ipv6_setting ( struct setting_type *type __unused,
+static int format_ipv6_setting ( const struct setting_type *type __unused,
const void *raw, size_t raw_len, char *buf,
size_t len ) {
const struct in6_addr *ipv6 = raw;
@@ -992,7 +992,7 @@ static int format_ipv6_setting ( struct setting_type *type __unused,
}
/** An IPv6 address setting type */
-struct setting_type setting_type_ipv6 __setting_type = {
+const struct setting_type setting_type_ipv6 __setting_type = {
.name = "ipv6",
.parse = parse_ipv6_setting,
.format = format_ipv6_setting,