summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorDavid Zeuthen <zeuthen@gmail.com>2012-11-19 15:33:02 -0500
committerDavid Zeuthen <zeuthen@gmail.com>2012-11-19 15:33:02 -0500
commit81f42ad3d54723fd15e0ca3159f6ee77c361a899 (patch)
tree6592b00ba2c0393678ed58603c4efe001c648540 /data
parent81dcb6eeaeceb6c6faae1a40a5b34a65cd5af653 (diff)
Add Drive.Ata.SmartSetEnabled() method
Signed-off-by: David Zeuthen <zeuthen@gmail.com>
Diffstat (limited to 'data')
-rw-r--r--data/org.freedesktop.UDisks2.xml20
-rw-r--r--data/org.freedesktop.udisks2.policy.in11
2 files changed, 31 insertions, 0 deletions
diff --git a/data/org.freedesktop.UDisks2.xml b/data/org.freedesktop.UDisks2.xml
index f1b19c9..c5c24cf 100644
--- a/data/org.freedesktop.UDisks2.xml
+++ b/data/org.freedesktop.UDisks2.xml
@@ -604,6 +604,26 @@
<arg name="options" direction="in" type="a{sv}"/>
</method>
+ <!--
+ SmartSetEnabled:
+ @value: %TRUE to enable SMART, %FALSE to disable SMART.
+ @options: Options (currently unused except for <link linkend="udisks-std-options">standard options</link>).
+
+ Sets whether SMART is enabled for the drive. This setting is
+ stored in the non-volatile memory in the drive itself and does
+ not need to be refreshed every time the drive is powered on or
+ connected.
+
+ Since this may require authentication and thus may fail, it is
+ a implemented this way instead of the
+ #org.freedesktop.UDisks2.Drive.Ata:SmartEnabled property being
+ writable.
+ -->
+ <method name="SmartSetEnabled">
+ <arg name="value" direction="in" type="b"/>
+ <arg name="options" direction="in" type="a{sv}"/>
+ </method>
+
<!-- PmSupported: Whether the drive supports power management. -->
<property name="PmSupported" type="b" access="read"/>
diff --git a/data/org.freedesktop.udisks2.policy.in b/data/org.freedesktop.udisks2.policy.in
index 0925b9a..ac35ff9 100644
--- a/data/org.freedesktop.udisks2.policy.in
+++ b/data/org.freedesktop.udisks2.policy.in
@@ -435,6 +435,17 @@
</defaults>
</action>
+ <!-- Enable/Disable SMART -->
+ <action id="org.freedesktop.udisks2.ata-smart-enable-disable">
+ <_description>Enable/Disable SMART</_description>
+ <_message>Authentication is required to enable/disable SMART</_message>
+ <defaults>
+ <allow_any>auth_admin</allow_any>
+ <allow_inactive>auth_admin</allow_inactive>
+ <allow_active>auth_admin_keep</allow_active>
+ </defaults>
+ </action>
+
<!-- ###################################################################### -->
<!-- ATA Power Management -->