summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--discover/paths.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/discover/paths.c b/discover/paths.c
index 5b550fa..8e2a361 100644
--- a/discover/paths.c
+++ b/discover/paths.c
@@ -116,9 +116,17 @@ const char *mountpoint_for_device(const char *dev)
char *resolve_path(void *alloc_ctx, const char *path, const char *current_dev)
{
+ static const char s_file[] = "file://";
char *ret;
const char *devpath, *sep;
+ /* test for urls */
+
+ if (!strncasecmp(path, s_file, sizeof(s_file) - 1))
+ path += sizeof(s_file) - 1;
+ else if (strstr(path, "://"))
+ return talloc_strdup(alloc_ctx, path);
+
sep = strchr(path, ':');
if (!sep) {
devpath = mountpoint_for_device(current_dev);
OpenPOWER on IntegriCloud