summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--discover/device-handler.c7
-rw-r--r--discover/udev.c6
2 files changed, 12 insertions, 1 deletions
diff --git a/discover/device-handler.c b/discover/device-handler.c
index 80187ff..9c8dea8 100644
--- a/discover/device-handler.c
+++ b/discover/device-handler.c
@@ -806,6 +806,7 @@ static bool check_existing_mount(struct discover_device *dev)
static int mount_device(struct discover_device *dev)
{
+ const char *fstype;
int rc;
if (!dev->device_path)
@@ -817,6 +818,10 @@ static int mount_device(struct discover_device *dev)
if (check_existing_mount(dev))
return 0;
+ fstype = discover_device_get_param(dev, "ID_FS_TYPE");
+ if (!fstype)
+ return 0;
+
dev->mount_path = join_paths(dev, mount_base(),
dev->device_path);
@@ -828,7 +833,7 @@ static int mount_device(struct discover_device *dev)
rc = process_run_simple(dev, pb_system_apps.mount,
dev->device_path, dev->mount_path,
- "-o", "ro", NULL);
+ "-t", fstype, "-o", "ro", NULL);
if (!rc) {
dev->mounted = true;
dev->mounted_rw = false;
diff --git a/discover/udev.c b/discover/udev.c
index 0b2ec2f..7a99eea 100644
--- a/discover/udev.c
+++ b/discover/udev.c
@@ -69,6 +69,7 @@ static int udev_handle_block_add(struct pb_udev *udev, struct udev_device *dev,
const char *path;
const char *node;
const char *prop;
+ const char *type;
bool cdrom;
typestr = udev_device_get_devtype(dev);
@@ -101,6 +102,11 @@ static int udev_handle_block_add(struct pb_udev *udev, struct udev_device *dev,
}
}
+ type = udev_device_get_property_value(dev, "ID_FS_TYPE");
+ if (!type) {
+ pb_debug("SKIP: %s: no ID_FS_TYPE property\n", name);
+ return 0;
+ }
/* We may see multipath devices; they'll have the same uuid as an
* existing device, so only parse the first. */
OpenPOWER on IntegriCloud