X-Git-Url: http://git.ozlabs.org/?p=petitboot;a=blobdiff_plain;f=discover%2Fpxe-parser.c;h=e245f1b82b10536f6fb549237dc0627fc18fbb91;hp=811679dd2a95f7c9478e0f560b72ef25c61dbc08;hb=b1d15f894473d4b1e90ad273487a432bcd637195;hpb=59dbd08e2a8354e71578c0d7ca2283951a384801 diff --git a/discover/pxe-parser.c b/discover/pxe-parser.c index 811679d..e245f1b 100644 --- a/discover/pxe-parser.c +++ b/discover/pxe-parser.c @@ -1,5 +1,7 @@ -#define _GNU_SOURCE +#if defined(HAVE_CONFIG_H) +#include "config.h" +#endif #include #include @@ -99,6 +101,7 @@ static int pxe_parse(struct discover_context *dc) char **pxe_conf_files, **filename; struct pb_url *conf_url, *url; struct conf_context *conf; + bool complete_url; int len, rc; char *buf; @@ -119,11 +122,13 @@ static int pxe_parse(struct discover_context *dc) parser_info = talloc_zero(conf, struct pxe_parser_info); conf->parser_info = parser_info; - conf_url = user_event_parse_conf_url(dc, dc->event); + conf_url = user_event_parse_conf_url(dc, dc->event, &complete_url); if (!conf_url) goto out_conf; - if (dc->conf_url) { + if (complete_url) { + /* we have a complete URL; use this and we're done. */ + dc->conf_url = conf_url; rc = parser_request_url(dc, dc->conf_url, &buf, &len); if (rc) goto out_conf;