diff --git a/lib/filters/filter.c b/lib/filters/filter.c index 01cf80de6..1a5af2455 100644 --- a/lib/filters/filter.c +++ b/lib/filters/filter.c @@ -28,6 +28,7 @@ #include #include #include +#include #define NUMBER_OF_MAJORS 256 @@ -103,6 +104,14 @@ static int *_scan_proc_dev(const char *proc, struct config_node *cn) return NULL; } + if (!*proc) { + log_verbose("No proc filesystem found: using all block device " + "types"); + for (i = 0; i < NUMBER_OF_MAJORS; i++) + max_partitions_by_major[i] = 1; + return max_partitions_by_major; + } + if (lvm_snprintf(proc_devices, sizeof(proc_devices), "%s/devices", proc) < 0) { log_error("Failed to create /proc/devices string");