From: Neelesh Gupta Date: Mon, 28 Oct 2013 07:15:08 +0000 (+0530) Subject: lib/url: Export is_url() function X-Git-Tag: v1.0.0~368 X-Git-Url: http://git.ozlabs.org/?p=petitboot;a=commitdiff_plain;h=f385e8cacbc574e213b0805a8d383373f29a8058 lib/url: Export is_url() function Signed-off-by: Neelesh Gupta Signed-off-by: Jeremy Kerr --- diff --git a/lib/url/url.c b/lib/url/url.c index 8a3d0db..700f87c 100644 --- a/lib/url/url.c +++ b/lib/url/url.c @@ -22,7 +22,6 @@ #define _GNU_SOURCE #include -#include #include #include "log/log.h" @@ -228,7 +227,7 @@ fail: return NULL; } -static bool is_url(const char *str) +bool is_url(const char *str) { return strstr(str, "://") != NULL; } diff --git a/lib/url/url.h b/lib/url/url.h index 997cdcb..25e1ad8 100644 --- a/lib/url/url.h +++ b/lib/url/url.h @@ -19,6 +19,8 @@ #if !defined(_PB_URL_PARSER_H) #define _PB_URL_PARSER_H +#include + /** * enum pb_url_scheme - Enumeration of the URL schemes we can handle. */ @@ -58,6 +60,7 @@ struct pb_url { char *file; }; +bool is_url(const char *str); struct pb_url *pb_url_parse(void *ctx, const char *url_str); struct pb_url *pb_url_join(void *ctx, const struct pb_url *url, const char *s); char *pb_url_to_string(struct pb_url *url);