mirror of
https://github.com/kdave/btrfs-progs
synced 2025-04-01 22:48:06 +00:00
btrfs-progs: fix device mapper path canonicalization
Commit 922eaa7b54
("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 <dsterba@suse.com>
This commit is contained in:
parent
1804dcaa4b
commit
2347b34af4
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user