Add 'no_partitions' feature
[multipath-tools/.git] / kpartx / kpartx.c
index b70c463..5007ce2 100644 (file)
@@ -336,6 +336,11 @@ main(int argc, char **argv){
 
        if (!mapname)
                mapname = device + off;
+       else if (dm_no_partitions((unsigned int)MAJOR(buf.st_rdev),
+                                 (unsigned int)MINOR(buf.st_rdev))) {
+               /* Feature 'no_partitions' is set, return */
+               return 0;
+       }
 
        fd = open(device, O_RDONLY);