X-Git-Url: http://git.ozlabs.org/?p=petitboot;a=blobdiff_plain;f=discover%2Fplatform-powerpc.c;h=5abc4d7059daa24babceed82de8115ccf49763d3;hp=7370d7dcc20a21e78dacc57e2efc8ebe7e3cdb0f;hb=32d3249e252fe201eb81155cbf3b800ce5cf88e0;hpb=45e9e7a53540e87e2129bb11fd853501131fb795 diff --git a/discover/platform-powerpc.c b/discover/platform-powerpc.c index 7370d7d..5abc4d7 100644 --- a/discover/platform-powerpc.c +++ b/discover/platform-powerpc.c @@ -310,7 +310,7 @@ static int parse_one_interface_config(struct config *config, } else if (!strcmp(tok, "static")) { ifconf->method = CONFIG_METHOD_STATIC; - /* ip/mask, [optional] gateway */ + /* ip/mask, [optional] gateway, [optional] url */ tok = strtok_r(NULL, ",", &saveptr); if (!tok) goto out_err; @@ -323,6 +323,12 @@ static int parse_one_interface_config(struct config *config, talloc_strdup(ifconf, tok); } + tok = strtok_r(NULL, ",", &saveptr); + if (tok) { + ifconf->static_config.url = + talloc_strdup(ifconf, tok); + } + } else { pb_log("Unknown network configuration method %s\n", tok); goto out_err; @@ -575,10 +581,12 @@ static char *iface_config_str(void *ctx, struct interface_config *config) str = talloc_asprintf_append(str, "dhcp"); } else if (config->method == CONFIG_METHOD_STATIC) { - str = talloc_asprintf_append(str, "static,%s%s%s", + str = talloc_asprintf_append(str, "static,%s%s%s%s%s", config->static_config.address, config->static_config.gateway ? "," : "", - config->static_config.gateway ?: ""); + config->static_config.gateway ?: "", + config->static_config.url ? "," : "", + config->static_config.url ?: ""); } return str; }