hal/doc/spec hal-spec.html,1.30,1.31
David Zeuthen
david at freedesktop.org
Thu Oct 14 11:37:30 PDT 2004
Update of /cvs/hal/hal/doc/spec
In directory gabe:/tmp/cvs-serv19112/doc/spec
Modified Files:
hal-spec.html
Log Message:
2004-10-14 David Zeuthen <davidz at redhat.com>
* configure.in: Add fstab-sync.8 to AC_OUTPUT
* doc/conf/storage-non-fixed.fdi: New file, example
* doc/conf/storage-skip-all.fdi: New file, example
* doc/conf/Makefile.am: Dist and install two new .fdi files
* fdi/90defaultpolicy/storage-policy.fdi: Fix a typo in a comment
* hald/device_info.c:
(my_alphasort): New function
(scan_fdi_files): Use my_alphasort to sort in the right order. Process
all .fdi files instead of bailing out on the first match.
* hald/linux/osspec.c:
(get_selinux_removable_context): New function, copied over from
tools/fstab-sync.c (not currently used)
(osspec_probe): Use get_selinux_removable_context (not currently used)
* libhal-storage/libhal-storage.c:
(hal_drive_policy_get_mount_options): Check if mount_option property
is actually FALSE.
(hal_volume_policy_get_mount_options): Same
* libhal/libhal.c:
(hal_free_property_set): Check if object to free is NULL and just
return. Allows hal_free_property_set (NULL).
* tools/Makefile.am: Add rules for building fstab-sync.8 man page
* tools/fstab-sync.8.in: New file
* tools/fstab-sync.c: Much rewritten to use libhal-storage and the new
policy properties. See diff for details.
Index: hal-spec.html
===================================================================
RCS file: /cvs/hal/hal/doc/spec/hal-spec.html,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -d -r1.30 -r1.31
--- hal-spec.html 13 Oct 2004 13:50:06 -0000 1.30
+++ hal-spec.html 14 Oct 2004 18:37:28 -0000 1.31
@@ -456,21 +456,21 @@
><DL
><DT
><A
-HREF="#AEN2138"
+HREF="#AEN2141"
>Interface org.freedesktop.Hal.Manager</A
></DT
><DD
><DL
><DT
><A
-HREF="#AEN2149"
+HREF="#AEN2152"
>Example</A
></DT
></DL
></DD
><DT
><A
-HREF="#AEN2157"
+HREF="#AEN2160"
>Interface org.freedesktop.Hal.Device</A
></DT
></DL
@@ -6386,7 +6386,16 @@
CLASS="literal"
>is_absolute_path</TT
> - matches only when a string property represents an absolute path
- (the path doesn't have to exist).
+ (the path doesn't have to exist). Can be used with 'true' or 'false'.
+ </P
+></LI
+><LI
+><P
+> <TT
+CLASS="literal"
+>is_ascii</TT
+> - matches only when a string property contain only ASCII characters.
+ Can be used with 'true' or 'false'.
</P
></LI
><LI
@@ -6908,59 +6917,104 @@
<!-- Normal volumes; use volume label, uuid or drive_type -->
<match key="block.is_volume" bool="true">
<match key="volume.fsusage" string="filesystem">
+ <!-- skip for drives with the no partitions hint (they are handled above) -->
+ <match key="@block.storage_device:storage.no_partitions_hint" bool="false">
- <merge key="volume.policy.should_mount" type="bool">true</merge>
- <merge key="volume.policy.mount_filesystem" type="copy_property">volume.fstype</merge>
-
- <!-- Fallback is '<storage.drive_type>', e.g. disk, compact_flash etc. -->
- <merge key="volume.policy.desired_mount_point" type="copy_property">@block.storage_device:storage.drive_type</merge>
-
- <!-- Better: if available use UUID -->
- <match key="volume.uuid" empty="false">
- <merge key="volume.policy.desired_mount_point" type="copy_property">volume.uuid</merge>
- </match>
-
- <!-- Best: If available use filesystem label -->
- <match key="volume.label" empty="false">
- <!-- unless it's a path (e.g. /boot, /, /home etc) -->
- <match key="volume.label" is_absolute_path="false">
- <merge key="volume.policy.desired_mount_point" type="copy_property">volume.label</merge>
+ <merge key="volume.policy.should_mount" type="bool">true</merge>
+ <merge key="volume.policy.mount_filesystem" type="copy_property">volume.fstype</merge>
+
+ <!-- Fallback is '<storage.drive_type>', e.g. disk, compact_flash etc. -->
+ <merge key="volume.policy.desired_mount_point" type="copy_property">@block.storage_device:storage.drive_type</merge>
+
+ <!-- Better: if available use UUID -->
+ <match key="volume.uuid" empty="false">
+ <merge key="volume.policy.desired_mount_point" type="copy_property">volume.uuid</merge>
</match>
- </match>
-
- <!-- Should never mount Apple Bootstrap partitions (it would be
- a security hole) - should use the bootable flag from the
- Mac partition table instead -->
- <match key="volume.fstype" string="hfs">
- <match key="volume.label" string="bootstrap">
- <merge key="volume.policy.should_mount" type="bool">false</merge>
- </match>
- </match>
-
- <!-- Use selinux mount options for hotpluggable and removable
- volumes -->
- <match key="/org/freedesktop/Hal/devices/computer:linux.is_selinux_enabled" bool="true">
- <match key="@block.storage_device:storage.hotpluggable" bool="true">
- <merge key="volume.policy.mount_option.fscontext=system_u:object_r:removable_t" type="bool">true</merge>
+
+ <!-- Best: If available use filesystem label -->
+ <match key="volume.label" empty="false">
+ <!-- unless it's a path (e.g. /boot, /, /home etc) -->
+ <match key="volume.label" is_absolute_path="false">
+ <!-- and only if the label is ascii -->
+ <match key="volume.label" is_ascii="true">
+ <merge key="volume.policy.desired_mount_point" type="copy_property">volume.label</merge>
+ </match>
+ </match>
+ </match>
+
+ <!-- Should never mount Apple Bootstrap partitions (it would be
+ a security hole) - should use the bootable flag from the
+ Mac partition table instead -->
+ <match key="volume.fstype" string="hfs">
+ <match key="volume.label" string="bootstrap">
+ <merge key="volume.policy.should_mount" type="bool">false</merge>
+ </match>
</match>
- <match key="@block.storage_device:storage.removable" bool="true">
- <merge key="volume.policy.mount_option.fscontext=system_u:object_r:removable_t" type="bool">true</merge>
+
+ <!-- Use selinux mount options for hotpluggable and removable
+ volumes -->
+ <match key="/org/freedesktop/Hal/devices/computer:linux.is_selinux_enabled" bool="true">
+ <match key="@block.storage_device:storage.hotpluggable" bool="true">
+ <merge key="volume.policy.mount_option.fscontext=system_u:object_r:removable_t" type="bool">true</merge>
+ </match>
+ <match key="@block.storage_device:storage.removable" bool="true">
+ <merge key="volume.policy.mount_option.fscontext=system_u:object_r:removable_t" type="bool">true</merge>
+ </match>
</match>
- </match>
- <!-- Use noatime and sync options for all hotpluggable or removable
- volumes smaller than 2GB -->
- <match key="volume.size" compare_lt="2147483648">
- <match key="@block.storage_device:storage.hotpluggable" bool="true">
- <merge key="volume.policy.mount_option.async" type="bool">true</merge>
- <merge key="volume.policy.mount_option.noatime" type="bool">true</merge>
+ <!-- Use noatime and sync options for all hotpluggable or removable
+ volumes smaller than 2GB -->
+ <match key="volume.size" compare_lt="2147483648">
+ <match key="@block.storage_device:storage.hotpluggable" bool="true">
+ <merge key="volume.policy.mount_option.async" type="bool">true</merge>
+ <merge key="volume.policy.mount_option.noatime" type="bool">true</merge>
+ </match>
+ <match key="@block.storage_device:storage.removable" bool="true">
+ <merge key="volume.policy.mount_option.async" type="bool">true</merge>
+ <merge key="volume.policy.mount_option.noatime" type="bool">true</merge>
+ </match>
</match>
- <match key="@block.storage_device:storage.removable" bool="true">
- <merge key="volume.policy.mount_option.async" type="bool">true</merge>
- <merge key="volume.policy.mount_option.noatime" type="bool">true</merge>
+
+ <!-- whitelist of partition table id, if from a msdos partition table -->
+ <match key="volume.partition.msdos_part_table_type" exists="true">
+ <!-- Default to no mount and punch holes -->
+ <merge key="volume.policy.should_mount" type="bool">false</merge>
+ <!-- Linux -->
+ <match key="volume.partition.msdos_part_table_type" int="0x83">
+ <merge key="volume.policy.should_mount" type="bool">true</merge>
+ </match>
+ <!-- FAT12 -->
+ <match key="volume.partition.msdos_part_table_type" int="0x01">
+ <merge key="volume.policy.should_mount" type="bool">true</merge>
+ </match>
+ <!-- FAT16 <32M -->
+ <match key="volume.partition.msdos_part_table_type" int="0x04">
+ <merge key="volume.policy.should_mount" type="bool">true</merge>
+ </match>
+ <!-- FAT16 -->
+ <match key="volume.partition.msdos_part_table_type" int="0x06">
+ <merge key="volume.policy.should_mount" type="bool">true</merge>
+ </match>
+ <!-- HPFS/NTFS -->
+ <match key="volume.partition.msdos_part_table_type" int="0x07">
+ <merge key="volume.policy.should_mount" type="bool">true</merge>
+ </match>
+ <!-- W95 FAT32 -->
+ <match key="volume.partition.msdos_part_table_type" int="0x0b">
+ <merge key="volume.policy.should_mount" type="bool">true</merge>
+ </match>
+ <!-- W95 FAT32 (LBA) -->
+ <match key="volume.partition.msdos_part_table_type" int="0x0c">
+ <merge key="volume.policy.should_mount" type="bool">true</merge>
+ </match>
+ <!-- W95 FAT16 (LBA) -->
+ <match key="volume.partition.msdos_part_table_type" int="0x0e">
+ <merge key="volume.policy.should_mount" type="bool">true</merge>
+ </match>
</match>
- </match>
+
+ </match>
</match>
</match>
</device>
@@ -7064,7 +7118,7 @@
><P
></P
><A
-NAME="AEN2096"
+NAME="AEN2099"
></A
><TABLE
BORDER="1"
@@ -7224,7 +7278,7 @@
><HR><H2
CLASS="sect1"
><A
-NAME="AEN2138"
+NAME="AEN2141"
>Interface org.freedesktop.Hal.Manager</A
></H2
><P
@@ -7340,7 +7394,7 @@
><HR><H3
CLASS="sect2"
><A
-NAME="AEN2149"
+NAME="AEN2152"
>Example</A
></H3
><P
@@ -7458,7 +7512,7 @@
><HR><H2
CLASS="sect1"
><A
-NAME="AEN2157"
+NAME="AEN2160"
>Interface org.freedesktop.Hal.Device</A
></H2
><P
More information about the hal-commit
mailing list