]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
storage: Fix check for stable path check
authorJohn Ferlan <jferlan@redhat.com>
Tue, 21 Apr 2015 10:07:50 +0000 (06:07 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Tue, 21 Apr 2015 10:08:56 +0000 (06:08 -0400)
Fix the if (!STRPREFIX(path, "/dev")) to be if (!STRPREFIX(path, "/dev/"))
to ensure a path such as "/device" isn't declared stable.

src/storage/storage_backend.c

index b07e0d9f32c0baa31bc0adda8e25f7f1ecaf7ae7..e0311e1e3beb7297498aa0026a2eed4097c8c4cd 100644 (file)
@@ -1680,7 +1680,7 @@ virStorageBackendPoolPathIsStable(const char *path)
     if (path == NULL || STREQ(path, "/dev") || STREQ(path, "/dev/"))
         return false;
 
-    if (!STRPREFIX(path, "/dev"))
+    if (!STRPREFIX(path, "/dev/"))
         return false;
 
     return true;