118c2aff7Sartem<?xml version="1.0" encoding="UTF-8"?>
218c2aff7Sartem
318c2aff7Sartem<deviceinfo version="0.2">
418c2aff7Sartem  <device>
518c2aff7Sartem    <match key="info.udi" string="/org/freedesktop/Hal/devices/computer">
618c2aff7Sartem      <append key="info.callouts.add" type="strlist">hal-storage-cleanup-all-mountpoints</append>
718c2aff7Sartem    </match>
818c2aff7Sartem
918c2aff7Sartem    <match key="storage.media_check_enabled" bool="true">
1018c2aff7Sartem      <append key="info.addons" type="strlist">hald-addon-storage</append>
1118c2aff7Sartem    </match>
1218c2aff7Sartem
1318c2aff7Sartem    <match key="volume.is_disc" bool="true">
1418c2aff7Sartem      <match key="volume.disc.has_audio" bool="true">
1518c2aff7Sartem        <append key="info.interfaces" type="strlist">org.freedesktop.Hal.Device.Volume</append>
1618c2aff7Sartem        <append key="org.freedesktop.Hal.Device.Volume.method_names" type="strlist">Eject</append>
1718c2aff7Sartem        <append key="org.freedesktop.Hal.Device.Volume.method_signatures" type="strlist">as</append>
1818c2aff7Sartem	<append key="org.freedesktop.Hal.Device.Volume.method_argnames" type="strlist">extra_options</append>
1918c2aff7Sartem        <append key="org.freedesktop.Hal.Device.Volume.method_execpaths" type="strlist">hal-storage-eject</append>
2018c2aff7Sartem      </match>
2118c2aff7Sartem      <match key="volume.disc.is_blank" bool="true">
2218c2aff7Sartem        <append key="info.interfaces" type="strlist">org.freedesktop.Hal.Device.Volume</append>
2318c2aff7Sartem        <append key="org.freedesktop.Hal.Device.Volume.method_names" type="strlist">Eject</append>
2418c2aff7Sartem        <append key="org.freedesktop.Hal.Device.Volume.method_signatures" type="strlist">as</append>
2518c2aff7Sartem	<append key="org.freedesktop.Hal.Device.Volume.method_argnames" type="strlist">extra_options</append>
2618c2aff7Sartem        <append key="org.freedesktop.Hal.Device.Volume.method_execpaths" type="strlist">hal-storage-eject</append>
2718c2aff7Sartem      </match>
2818c2aff7Sartem    </match>
2918c2aff7Sartem
3018c2aff7Sartem    <!-- this is to be able to mount media in drives we cannot poll, e.g. IDE Zip Drives and PC style floppy drives -->
3118c2aff7Sartem    <match key="storage.media_check_enabled" bool="false">
3218c2aff7Sartem      <match key="storage.no_partitions_hint" bool="true">
3318c2aff7Sartem
3418c2aff7Sartem        <append key="info.interfaces" type="strlist">org.freedesktop.Hal.Device.Volume</append>
3518c2aff7Sartem
3618c2aff7Sartem        <append key="org.freedesktop.Hal.Device.Volume.method_names" type="strlist">Mount</append>
3718c2aff7Sartem        <append key="org.freedesktop.Hal.Device.Volume.method_signatures" type="strlist">ssas</append>
3818c2aff7Sartem	<append key="org.freedesktop.Hal.Device.Volume.method_argnames" type="strlist">mount_point fstype extra_options</append>
3918c2aff7Sartem        <append key="org.freedesktop.Hal.Device.Volume.method_execpaths" type="strlist">hal-storage-mount</append>
4018c2aff7Sartem
4118c2aff7Sartem        <append key="org.freedesktop.Hal.Device.Volume.method_names" type="strlist">Unmount</append>
4218c2aff7Sartem        <append key="org.freedesktop.Hal.Device.Volume.method_signatures" type="strlist">as</append>
4318c2aff7Sartem	<append key="org.freedesktop.Hal.Device.Volume.method_argnames" type="strlist">extra_options</append>
4418c2aff7Sartem        <append key="org.freedesktop.Hal.Device.Volume.method_execpaths" type="strlist">hal-storage-unmount</append>
4518c2aff7Sartem
4618c2aff7Sartem        <append key="org.freedesktop.Hal.Device.Volume.method_names" type="strlist">Eject</append>
4718c2aff7Sartem        <append key="org.freedesktop.Hal.Device.Volume.method_signatures" type="strlist">as</append>
4818c2aff7Sartem	<append key="org.freedesktop.Hal.Device.Volume.method_argnames" type="strlist">extra_options</append>
4918c2aff7Sartem        <append key="org.freedesktop.Hal.Device.Volume.method_execpaths" type="strlist">hal-storage-eject</append>
5018c2aff7Sartem
5118c2aff7Sartem        <!-- allow these mount options for all file systems -->
5218c2aff7Sartem        <append key="volume.mount.valid_options" type="strlist">ro</append>
5318c2aff7Sartem        <append key="volume.mount.valid_options" type="strlist">sync</append>
5418c2aff7Sartem        <append key="volume.mount.valid_options" type="strlist">dirsync</append>
5518c2aff7Sartem        <append key="volume.mount.valid_options" type="strlist">noatime</append>
5618c2aff7Sartem        <append key="volume.mount.valid_options" type="strlist">nodiratime</append>
5718c2aff7Sartem        <append key="volume.mount.valid_options" type="strlist">noexec</append>
5818c2aff7Sartem        <append key="volume.mount.valid_options" type="strlist">quiet</append>
5918c2aff7Sartem        <append key="volume.mount.valid_options" type="strlist">remount</append>
6018c2aff7Sartem	<append key="volume.mount.valid_options" type="strlist">exec</append>
6118c2aff7Sartem        <!-- As this is removable media give some leeway -->
6218c2aff7Sartem	<append key="volume.mount.valid_options" type="strlist">utf8</append>
6318c2aff7Sartem	<append key="volume.mount.valid_options" type="strlist">shortname=</append>
6418c2aff7Sartem	<append key="volume.mount.valid_options" type="strlist">codepage=</append>
6518c2aff7Sartem	<append key="volume.mount.valid_options" type="strlist">iocharset=</append>
6618c2aff7Sartem	<append key="volume.mount.valid_options" type="strlist">umask=</append>
6718c2aff7Sartem	<append key="volume.mount.valid_options" type="strlist">uid=</append>
6818c2aff7Sartem
6918c2aff7Sartem      </match>
7018c2aff7Sartem    </match>
7118c2aff7Sartem
7218c2aff7Sartem
7318c2aff7Sartem    <match key="volume.fsusage" string="filesystem">
7418c2aff7Sartem
7518c2aff7Sartem      <!-- Here follow volumes we specifically want to ignore - it is the -->
7618c2aff7Sartem      <!-- responsibility of software higher in the stack (e.g. gnome-vfs) -->
7718c2aff7Sartem      <!-- amd mount programs (e.g. Mount() on HAL) to respect volume.ignore -->
7818c2aff7Sartem      <merge key="volume.ignore" type="bool">false</merge>
7918c2aff7Sartem
8018c2aff7Sartem      <match key="@block.storage_device:storage.removable" bool="false">
8118c2aff7Sartem
8218c2aff7Sartem        <!-- Should always ignore Apple Bootstrap partitions (it would be -->
8318c2aff7Sartem	<!-- a security hole to mount it) - TODO: should use the bootable -->
8418c2aff7Sartem  	<!-- flag from the Mac partition table instead -->
8518c2aff7Sartem        <match key="volume.fstype" string="hfs">
8618c2aff7Sartem	  <match key="volume.label" string="bootstrap">
8718c2aff7Sartem    	    <merge key="volume.ignore" type="bool">true</merge>
8818c2aff7Sartem	  </match>
8918c2aff7Sartem        </match>
9018c2aff7Sartem
9118c2aff7Sartem        <!-- HP ships desktops with a recovery partition -->
9218c2aff7Sartem        <match key="volume.fstype" string="vfat">
9318c2aff7Sartem	  <match key="volume.label" string="HP_RECOVERY">
9418c2aff7Sartem	    <merge key="volume.ignore" type="bool">true</merge>
9518c2aff7Sartem	  </match>
9618c2aff7Sartem        </match>
9718c2aff7Sartem
9818c2aff7Sartem        <!-- EFI firmware partitions -->
9918c2aff7Sartem        <match key="volume.fstype" string="vfat">
10018c2aff7Sartem	  <match key="volume.label" string="EFI">
10118c2aff7Sartem	    <merge key="volume.ignore" type="bool">true</merge>
10218c2aff7Sartem	  </match>
10318c2aff7Sartem        </match>
10418c2aff7Sartem
10518c2aff7Sartem      </match>
10618c2aff7Sartem
10718c2aff7Sartem
10818c2aff7Sartem      <append key="info.interfaces" type="strlist">org.freedesktop.Hal.Device.Volume</append>
10918c2aff7Sartem
11018c2aff7Sartem      <append key="org.freedesktop.Hal.Device.Volume.method_names" type="strlist">Mount</append>
11118c2aff7Sartem      <append key="org.freedesktop.Hal.Device.Volume.method_signatures" type="strlist">ssas</append>
11218c2aff7Sartem      <append key="org.freedesktop.Hal.Device.Volume.method_argnames" type="strlist">mount_point fstype extra_options</append>
11318c2aff7Sartem      <append key="org.freedesktop.Hal.Device.Volume.method_execpaths" type="strlist">hal-storage-mount</append>
11418c2aff7Sartem
11518c2aff7Sartem      <append key="org.freedesktop.Hal.Device.Volume.method_names" type="strlist">Unmount</append>
11618c2aff7Sartem      <append key="org.freedesktop.Hal.Device.Volume.method_signatures" type="strlist">as</append>
11718c2aff7Sartem      <append key="org.freedesktop.Hal.Device.Volume.method_argnames" type="strlist">extra_options</append>
11818c2aff7Sartem      <append key="org.freedesktop.Hal.Device.Volume.method_execpaths" type="strlist">hal-storage-unmount</append>
11918c2aff7Sartem
12018c2aff7Sartem      <append key="org.freedesktop.Hal.Device.Volume.method_names" type="strlist">Eject</append>
12118c2aff7Sartem      <append key="org.freedesktop.Hal.Device.Volume.method_signatures" type="strlist">as</append>
12218c2aff7Sartem      <append key="org.freedesktop.Hal.Device.Volume.method_argnames" type="strlist">extra_options</append>
12318c2aff7Sartem      <append key="org.freedesktop.Hal.Device.Volume.method_execpaths" type="strlist">hal-storage-eject</append>
12418c2aff7Sartem
12518c2aff7Sartem      <!-- allow these mount options for all file systems -->
12618c2aff7Sartem      <append key="volume.mount.valid_options" type="strlist">ro</append>
12718c2aff7Sartem      <append key="volume.mount.valid_options" type="strlist">sync</append>
12818c2aff7Sartem      <append key="volume.mount.valid_options" type="strlist">dirsync</append>
12918c2aff7Sartem      <append key="volume.mount.valid_options" type="strlist">noatime</append>
13018c2aff7Sartem      <append key="volume.mount.valid_options" type="strlist">nodiratime</append>
13118c2aff7Sartem      <append key="volume.mount.valid_options" type="strlist">noexec</append>
13218c2aff7Sartem      <append key="volume.mount.valid_options" type="strlist">quiet</append>
13318c2aff7Sartem      <append key="volume.mount.valid_options" type="strlist">remount</append>
13418c2aff7Sartem      <append key="volume.mount.valid_options" type="strlist">exec</append>
13518c2aff7Sartem
13618c2aff7Sartem      <!-- allow these mount options for vfat -->
13718c2aff7Sartem      <match key="volume.fstype" string="vfat">
13818c2aff7Sartem	<append key="volume.mount.valid_options" type="strlist">utf8</append>
13918c2aff7Sartem	<append key="volume.mount.valid_options" type="strlist">shortname=</append>
14018c2aff7Sartem	<append key="volume.mount.valid_options" type="strlist">codepage=</append>
14118c2aff7Sartem	<append key="volume.mount.valid_options" type="strlist">iocharset=</append>
14218c2aff7Sartem	<append key="volume.mount.valid_options" type="strlist">umask=</append>
14318c2aff7Sartem	<append key="volume.mount.valid_options" type="strlist">dmask=</append>
14418c2aff7Sartem	<append key="volume.mount.valid_options" type="strlist">fmask=</append>
14518c2aff7Sartem	<append key="volume.mount.valid_options" type="strlist">uid=</append>
14618c2aff7Sartem      </match>
14718c2aff7Sartem
14818c2aff7Sartem
14918c2aff7Sartem      <!-- allow these mount options for hfs -->
15018c2aff7Sartem      <match key="volume.fstype" string="hfs">
15118c2aff7Sartem	<append key="volume.mount.valid_options" type="strlist">uid=</append>
15218c2aff7Sartem	<append key="volume.mount.valid_options" type="strlist">force</append>
15318c2aff7Sartem      </match>
15418c2aff7Sartem
15518c2aff7Sartem      <!-- allow these mount options for hfsplus -->
15618c2aff7Sartem      <match key="volume.fstype" string="hfsplus">
15718c2aff7Sartem	<append key="volume.mount.valid_options" type="strlist">uid=</append>
15818c2aff7Sartem	<append key="volume.mount.valid_options" type="strlist">force</append>
15918c2aff7Sartem      </match>
16018c2aff7Sartem
16118c2aff7Sartem      <!-- allow these mount options for ntfs -->
16218c2aff7Sartem      <match key="volume.fstype" string="ntfs">
16318c2aff7Sartem	<append key="volume.mount.valid_options" type="strlist">uid=</append>
16418c2aff7Sartem	<append key="volume.mount.valid_options" type="strlist">gid=</append>
16518c2aff7Sartem	<append key="volume.mount.valid_options" type="strlist">umask=</append>
16618c2aff7Sartem      </match>
16718c2aff7Sartem
16818c2aff7Sartem      <!-- allow these mount options for ext3 -->
16918c2aff7Sartem      <match key="volume.fstype" string="ext3">
17018c2aff7Sartem	<append key="volume.mount.valid_options" type="strlist">data=</append>
17118c2aff7Sartem      </match>
17218c2aff7Sartem
17318c2aff7Sartem      <!-- udf -->
17418c2aff7Sartem      <match key="volume.fstype" string="udf">
17518c2aff7Sartem	<append key="volume.mount.valid_options" type="strlist">uid=</append>
17618c2aff7Sartem	<append key="volume.mount.valid_options" type="strlist">umask=</append>
17718c2aff7Sartem      </match>
17818c2aff7Sartem
17918c2aff7Sartem      <!-- iso9660 -->
18018c2aff7Sartem      <match key="volume.fstype" string="iso9660">
18118c2aff7Sartem	<append key="volume.mount.valid_options" type="strlist">utf8</append>
18218c2aff7Sartem	<append key="volume.mount.valid_options" type="strlist">uid=</append>
18318c2aff7Sartem	<append key="volume.mount.valid_options" type="strlist">mode=</append>
18418c2aff7Sartem	<append key="volume.mount.valid_options" type="strlist">iocharset=</append>
18518c2aff7Sartem      </match>
18618c2aff7Sartem
187*0ebe3100Sartem      <!-- pcfs -->
188*0ebe3100Sartem      <match key="volume.fstype" string="pcfs">
189*0ebe3100Sartem	<append key="volume.mount.valid_options" type="strlist">foldcase</append>
190*0ebe3100Sartem	<append key="volume.mount.valid_options" type="strlist">nofoldcase</append>
191*0ebe3100Sartem      </match>
192*0ebe3100Sartem
19318c2aff7Sartem      <!-- allow these unmount options -->
19418c2aff7Sartem      <append key="volume.unmount.valid_options" type="strlist">lazy</append>
19518c2aff7Sartem
19618c2aff7Sartem    </match>
19718c2aff7Sartem
19818c2aff7Sartem    <match key="storage.requires_eject" bool="true">
19918c2aff7Sartem        <!-- storage Eject causes eject on each volume on this storage -->
20018c2aff7Sartem        <append key="info.interfaces" type="strlist">org.freedesktop.Hal.Device.Storage</append>
20118c2aff7Sartem        <append key="org.freedesktop.Hal.Device.Storage.method_names" type="strlist">Eject</append>
20218c2aff7Sartem        <append key="org.freedesktop.Hal.Device.Storage.method_signatures" type="strlist">as</append>
20318c2aff7Sartem	<append key="org.freedesktop.Hal.Device.Storage.method_argnames" type="strlist">extra_options</append>
20418c2aff7Sartem        <append key="org.freedesktop.Hal.Device.Storage.method_execpaths" type="strlist">hal-storage-eject</append>
20518c2aff7Sartem
20618c2aff7Sartem        <append key="info.interfaces" type="strlist">org.freedesktop.Hal.Device.Storage</append>
20718c2aff7Sartem        <append key="org.freedesktop.Hal.Device.Storage.method_names" type="strlist">CloseTray</append>
20818c2aff7Sartem        <append key="org.freedesktop.Hal.Device.Storage.method_signatures" type="strlist">as</append>
20918c2aff7Sartem	<append key="org.freedesktop.Hal.Device.Storage.method_argnames" type="strlist">extra_options</append>
21018c2aff7Sartem        <append key="org.freedesktop.Hal.Device.Storage.method_execpaths" type="strlist">hal-storage-closetray</append>
21118c2aff7Sartem    </match>
21218c2aff7Sartem  </device>
21318c2aff7Sartem</deviceinfo>
214