From 55810672dedbabf40938519eb37d7a470c28ea6a Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" 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 Date: Wed Apr 24 12:08:01 2024 +0100 options: Allow nbd+unix:// URIs (cherry picked from commit 7968de46f17eed7f18c200c6528ebdfec5c3f279) --- common | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Submodule common 54869c98..93a7f3af: diff --git a/common/options/uri.c b/common/options/uri.c index 84d393c1..9180d6a2 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 e4b30663..5848abd7 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;