mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-11 15:27:47 +00:00
storage: Fix check for stable path check
Fix the if (!STRPREFIX(path, "/dev")) to be if (!STRPREFIX(path, "/dev/")) to ensure a path such as "/device" isn't declared stable.
This commit is contained in:
parent
9126161d0b
commit
9e5e1ca144
@ -1680,7 +1680,7 @@ virStorageBackendPoolPathIsStable(const char *path)
|
|||||||
if (path == NULL || STREQ(path, "/dev") || STREQ(path, "/dev/"))
|
if (path == NULL || STREQ(path, "/dev") || STREQ(path, "/dev/"))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (!STRPREFIX(path, "/dev"))
|
if (!STRPREFIX(path, "/dev/"))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user