Fix regression caused by the patch
1f5d54a06
("Manage: Call validate_geometry when adding drive to external container")
- mdmonitor passes to Manage() routine dev name as min:mjr.
The open() used in validate_geometry_container()
in both ddf and imsm requires path, replace open calls by dev_open,
which allows to use dev path and min:mjr.
Signed-off-by: Blazej Kucman <blazej.kucman@intel.com>
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
if (!dev)
return 1;
- fd = open(dev, O_RDONLY|O_EXCL, 0);
+ fd = dev_open(dev, O_RDONLY|O_EXCL);
if (fd < 0) {
if (verbose)
pr_err("ddf: Cannot open %s: %s\n",
if (!dev)
return 1;
- fd = open(dev, O_RDONLY|O_EXCL, 0);
+ fd = dev_open(dev, O_RDONLY|O_EXCL);
if (fd < 0) {
if (verbose > 0)
pr_err("imsm: Cannot open %s: %s\n",