]> git.ozlabs.org Git - petitboot/commitdiff
lib/url: Export is_url() function
authorNeelesh Gupta <neelegup@linux.vnet.ibm.com>
Mon, 28 Oct 2013 07:15:08 +0000 (12:45 +0530)
committerJeremy Kerr <jk@ozlabs.org>
Wed, 6 Nov 2013 08:34:26 +0000 (16:34 +0800)
Signed-off-by: Neelesh Gupta <neelegup@linux.vnet.ibm.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
lib/url/url.c
lib/url/url.h

index 8a3d0db50ee6c38e5f39d8e2eb0ffe8e31928288..700f87cd936ed0d184cb75312f6cacac0c1739bf 100644 (file)
@@ -22,7 +22,6 @@
 
 #define _GNU_SOURCE
 #include <assert.h>
-#include <stdbool.h>
 #include <string.h>
 
 #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;
 }
index 997cdcb1333465889a561bf1115449cc51c0c6c0..25e1ad8175b9681935c5c53ee5a932638d1531d2 100644 (file)
@@ -19,6 +19,8 @@
 #if !defined(_PB_URL_PARSER_H)
 #define _PB_URL_PARSER_H
 
+#include <stdbool.h>
+
 /**
  * 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);