hal/fdi/policy/10osvendor 20-storage-methods.fdi,1.15,1.16

David Zeuthen david at freedesktop.org
Thu Feb 9 18:40:03 PST 2006


Update of /cvs/hal/hal/fdi/policy/10osvendor
In directory gabe:/tmp/cvs-serv14635/fdi/policy/10osvendor

Modified Files:
	20-storage-methods.fdi 
Log Message:
2006-02-09  David Zeuthen  <davidz at redhat.com>

        * tools/hal-system-storage-unmount: Use new property on the hal
        device object to figure out where hal mounted the device. This
        also ensures we only unmount stuff that we mounted ourselves
        ... where we = the hal mount/unmount methods. Also only allow the
        user who mounted the volume to unmount it (also allow uid 0).

        * tools/hal-system-storage-mount: Allow mounting of drives we
        don't poll. Export mount point and what uid mounted it as
        properties on the hal device object

        * fdi/policy/10osvendor/20-storage-methods.fdi: Fix up detection
        of blank and audio discs for the purpose of adding Eject methods.
        Export Mount, Unmount and Eject methods on drives we don't poll.
        Give some leeway with what mount options we support.



Index: 20-storage-methods.fdi
===================================================================
RCS file: /cvs/hal/hal/fdi/policy/10osvendor/20-storage-methods.fdi,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- 20-storage-methods.fdi	9 Feb 2006 20:05:35 -0000	1.15
+++ 20-storage-methods.fdi	10 Feb 2006 02:40:01 -0000	1.16
@@ -10,7 +10,7 @@
       <append key="info.addons" type="strlist">hald-addon-storage</append>
     </match>
 
-    <match key="@block.storage_device:storage.drive_type" string="cdrom">
+    <match key="volume.is_disc" bool="true">
       <match key="volume.disc.has_audio" bool="true">
         <append key="info.interfaces" type="strlist">org.freedesktop.Hal.Device.Volume</append>
         <append key="org.freedesktop.Hal.Device.Volume.method_names" type="strlist">Eject</append>
@@ -25,6 +25,45 @@
       </match>
     </match>
 
+    <!-- this is to be able to mount media in drives we cannot poll, e.g. IDE Zip Drives and PC style floppy drives -->
+    <match key="storage.media_check_enabled" bool="false">
+      <match key="storage.no_partitions_hint" bool="true">
+
+        <append key="info.interfaces" type="strlist">org.freedesktop.Hal.Device.Volume</append>
+
+        <append key="org.freedesktop.Hal.Device.Volume.method_names" type="strlist">Mount</append>
+        <append key="org.freedesktop.Hal.Device.Volume.method_signatures" type="strlist">ssas</append>
+        <append key="org.freedesktop.Hal.Device.Volume.method_execpaths" type="strlist">hal-system-storage-mount</append>
+
+        <append key="org.freedesktop.Hal.Device.Volume.method_names" type="strlist">Unmount</append>
+        <append key="org.freedesktop.Hal.Device.Volume.method_signatures" type="strlist">as</append>
+        <append key="org.freedesktop.Hal.Device.Volume.method_execpaths" type="strlist">hal-system-storage-unmount</append>
+
+        <append key="org.freedesktop.Hal.Device.Volume.method_names" type="strlist">Eject</append>
+        <append key="org.freedesktop.Hal.Device.Volume.method_signatures" type="strlist">as</append>
+        <append key="org.freedesktop.Hal.Device.Volume.method_execpaths" type="strlist">hal-system-storage-eject</append>
+
+        <!-- allow these mount options for all file systems -->
+        <append key="volume.mount.valid_options" type="strlist">ro</append>
+        <append key="volume.mount.valid_options" type="strlist">sync</append>
+        <append key="volume.mount.valid_options" type="strlist">dirsync</append>
+        <append key="volume.mount.valid_options" type="strlist">noatime</append>
+        <append key="volume.mount.valid_options" type="strlist">nodiratime</append>
+        <append key="volume.mount.valid_options" type="strlist">noexec</append>
+        <append key="volume.mount.valid_options" type="strlist">quiet</append>
+        <!-- As this is removable media give some leeway -->
+	<append key="volume.mount.valid_options" type="strlist">flush</append>
+	<append key="volume.mount.valid_options" type="strlist">utf8</append>
+	<append key="volume.mount.valid_options" type="strlist">shortname=</append>
+	<append key="volume.mount.valid_options" type="strlist">codepage=</append>
+	<append key="volume.mount.valid_options" type="strlist">iocharset=</append>
+	<append key="volume.mount.valid_options" type="strlist">umask=</append>
+	<append key="volume.mount.valid_options" type="strlist">uid=</append>
+
+      </match>
+    </match>
+
+
     <match key="volume.fsusage" string="filesystem">
 
       <!-- Here follow volumes we specifically want to ignore - it is the -->




More information about the hal-commit mailing list