From 2347b34af4d89cd4e9bc5575c098fdd6171b94a4 Mon Sep 17 00:00:00 2001 From: David Sterba Date: Wed, 10 Feb 2021 16:36:50 +0100 Subject: [PATCH] btrfs-progs: fix device mapper path canonicalization Commit 922eaa7b5472 ("btrfs-progs: build: fix linking with static libmount") broke path canonicalization, that prevented eg 'device add /dev/dm-0' to properly recognize the device mapper names. Issue: #339 Signed-off-by: David Sterba --- common/path-utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/path-utils.c b/common/path-utils.c index d4809a6a..e38513f6 100644 --- a/common/path-utils.c +++ b/common/path-utils.c @@ -325,7 +325,7 @@ char *path_canonicalize(const char *path) return strdup(path); p = strrchr(canonical, '/'); if (p && strncmp(p, "/dm-", 4) == 0 && isdigit(*(p + 4))) { - char *dm = path_canonicalize(p + 1); + char *dm = path_canonicalize_dm_name(p + 1); if (dm) { free(canonical);