My motherboard doesn't differentiate between its internal and external sata ports, so I'd like to mark some disks as external manually so they are automounted by kde. (I used to do this with a hal policy, but have now switched to udisks). I noticed this was down as a TODO in the code, so I've patched it in. I use the following udev rule to force system internal to 0: SUBSYSTEM=="block", ENV{ID_SERIAL_SHORT}=="ABCD1234", ENV{UDISKS_FORCE_SYSTEM_INTERNAL}="0"
From 108083b5adcc154cec70191f88b9206a44530765 Mon Sep 17 00:00:00 2001 From: Patrick Stewart <pats...@gmail.com> Date: Mon, 14 Feb 2011 16:24:33 +0000 Subject: [PATCH] Add system internal override
--- src/device.c | 16 +++++++++++++--- 1 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/device.c b/src/device.c index c4a83ff..296b250 100644 --- a/src/device.c +++ b/src/device.c @@ -3857,9 +3857,19 @@ static gboolean 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_FORCE_SYSTEM_INTERNAL")) + { + if (g_udev_device_get_property_as_boolean (device->priv->d, "UDISKS_FORCE_SYSTEM_INTERNAL")) + { + is_system_internal = TRUE; + } + else + { + is_system_internal = FALSE; + } + goto determined; + } /* start out by assuming the device is system internal, then adjust depending on what kind of * device we are dealing with -- 1.7.3.5
_______________________________________________ devkit-devel mailing list devkit-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/devkit-devel