Check UDISKS_SYSTEM_INTERNAL udev property to override the usual bus type based
"is drive system internal?" detection.
Based on patch by Patrick Stewart <patstew@gmail.com>, thank you!
icon theme specification.
</para></listitem>
</varlistentry>
+
+ <varlistentry>
+ <term><option>UDISKS_SYSTEM_INTERNAL</option></term>
+ <listitem><para>If set, this will override the usual bus type based
+ detection of whether a device is considered "system internal". "0"
+ means "removable" (i. e. eligible for automounting, and normal
+ users can mount), any other value means "system internal" (i.
+ e. no automounting, and only administrators can mount).
+ </para></listitem>
+ </varlistentry>
</variablelist>
<para>
The <option>ID_DRIVE_*</option> properties are used to describe what
update_info_is_system_internal (Device *device)
{
gboolean is_system_internal;
-
- /* TODO: make it possible to override this property from a udev property.
- */
+
+ if (g_udev_device_has_property (device->priv->d, "UDISKS_SYSTEM_INTERNAL"))
+ {
+ is_system_internal = g_udev_device_get_property_as_boolean (device->priv->d, "UDISKS_SYSTEM_INTERNAL");
+ goto determined;
+ }
/* start out by assuming the device is system internal, then adjust depending on what kind of
* device we are dealing with