+eeze_disk_mount_wrapper_get
Allow use of wrapper exes for mount commands (such as sudo)
---------------------------------------
++eeze_disk_udev_get_parent
+eeze_disk_udev_get_property
+eeze_disk_udev_get_sysattr
+eeze_disk_udev_walk_check_sysattr
EAPI const char *eeze_disk_udev_get_sysattr(Eeze_Disk *disk, const char *sysattr);
+/**
+ * Find the root device of a disk.
+ *
+ * @param disk The disk
+ * @return The syspath of the parent device
+ *
+ * Return a stringshared syspath (/sys/$syspath) for the parent device.
+ */
+EAPI const char *eeze_disk_udev_get_parent(Eeze_Disk *disk);
+
/**
* Walks up the device chain using the device from @p disk,
* checking each device for @p sysattr with (optional) @p value.
return eina_stringshare_add(ret);
}
+EAPI const char *
+eeze_disk_udev_get_parent(Eeze_Disk *disk)
+{
+ _udev_device *parent;
+ EINA_SAFETY_ON_NULL_RETURN_VAL(disk, NULL);
+
+ parent = udev_device_get_parent(disk->device);
+ return eina_stringshare_add(udev_device_get_syspath(parent));
+}
+
EAPI Eina_Bool
eeze_disk_udev_walk_check_sysattr(Eeze_Disk *disk,
const char *sysattr,
const char *value)
{
-
_udev_device *child, *parent;
const char *test = NULL;
eeze_disk_udev_walk_get_sysattr(Eeze_Disk *disk,
const char *sysattr)
{
-
_udev_device *child, *parent;
const char *test = NULL;