66 lines
2.0 KiB
Diff
66 lines
2.0 KiB
Diff
|
From d0b1b1eaaebdff2cee004304e9d498cd2a720e23 Mon Sep 17 00:00:00 2001
|
||
|
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||
|
Date: Wed, 24 Apr 2024 12:23:34 +0100
|
||
|
Subject: [PATCH] Update common submodule
|
||
|
|
||
|
In particular pick this:
|
||
|
|
||
|
commit 93a7f3af5c23ece6a8e092827ed5928a8973fd3c
|
||
|
Author: Richard W.M. Jones <rjones@redhat.com>
|
||
|
Date: Wed Apr 24 12:08:01 2024 +0100
|
||
|
|
||
|
options: Allow nbd+unix:// URIs
|
||
|
|
||
|
(cherry picked from commit 21a507d8aeb2d264863e1fbdfadc0ff44455ffb4)
|
||
|
---
|
||
|
common | 2 +-
|
||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||
|
|
||
|
Submodule common 54869c987..93a7f3af5:
|
||
|
diff --git a/common/options/uri.c b/common/options/uri.c
|
||
|
index 84d393c1e..9180d6a27 100644
|
||
|
--- a/common/options/uri.c
|
||
|
+++ b/common/options/uri.c
|
||
|
@@ -99,7 +99,7 @@ is_uri (const char *arg)
|
||
|
return 0;
|
||
|
|
||
|
for (p--; p >= arg; p--) {
|
||
|
- if (!c_islower (*p))
|
||
|
+ if (! (c_islower (*p) || *p == '+'))
|
||
|
return 0;
|
||
|
}
|
||
|
|
||
|
@@ -148,7 +148,10 @@ parse (const char *arg, char **path_ret, char **protocol_ret,
|
||
|
}
|
||
|
*/
|
||
|
|
||
|
- *protocol_ret = strdup (uri->scheme);
|
||
|
+ if (STREQ (uri->scheme, "nbd+unix"))
|
||
|
+ *protocol_ret = strdup ("nbd");
|
||
|
+ else
|
||
|
+ *protocol_ret = strdup (uri->scheme);
|
||
|
if (*protocol_ret == NULL) {
|
||
|
perror ("strdup: protocol");
|
||
|
return -1;
|
||
|
@@ -194,7 +197,7 @@ parse (const char *arg, char **path_ret, char **protocol_ret,
|
||
|
if (path && path[0] == '/' &&
|
||
|
(STREQ (uri->scheme, "gluster") ||
|
||
|
STREQ (uri->scheme, "iscsi") ||
|
||
|
- STREQ (uri->scheme, "nbd") ||
|
||
|
+ STRPREFIX (uri->scheme, "nbd") ||
|
||
|
STREQ (uri->scheme, "rbd") ||
|
||
|
STREQ (uri->scheme, "sheepdog")))
|
||
|
path++;
|
||
|
diff --git a/common/progress/progress.c b/common/progress/progress.c
|
||
|
index e4b30663f..5848abd70 100644
|
||
|
--- a/common/progress/progress.c
|
||
|
+++ b/common/progress/progress.c
|
||
|
@@ -123,6 +123,7 @@ progress_bar_init (unsigned flags)
|
||
|
bar->machine_readable = 1;
|
||
|
bar->utf8_mode = 0;
|
||
|
bar->have_terminfo = 0;
|
||
|
+ bar->fp = NULL;
|
||
|
} else {
|
||
|
bar->machine_readable = 0;
|
||
|
|