hal/doc/conf Makefile.am, NONE, 1.1 storage-policy-examples.fdi,
NONE, 1.1
David Zeuthen
david at freedesktop.org
Tue Oct 12 13:17:09 PDT 2004
Update of /cvs/hal/hal/doc/conf
In directory gabe:/tmp/cvs-serv22195/doc/conf
Added Files:
Makefile.am storage-policy-examples.fdi
Log Message:
2004-10-12 David Zeuthen <davidz at redhat.com>
First part of big patch to use .fdi files for policy properties.
* configure.in: Add a bunch of new configure.in variables
* doc/Makefile.am: Add conf directory
* doc/conf/Makefile.am: New file
* doc/conf/storage-policy-examples.fdi: New file
* fdi/30osvendor/Makefile.am: New file
* fdi/40oem/Makefile.am: New file
* fdi/50user/Makefile.am: New file
* fdi/90defaultpolicy/Makefile.am: New File
* fdi/90defaultpolicy/storage-policy.fdi: New file
* fdi/95userpolicy/Makefile.am: New file
* fdi/Makefile.am: Added new subdirs
* hald/Makefile.am: Link with libselinux if selinux is enabled
* hald/device.c:
(hal_device_property_get_as_string): New function
(hal_device_copy_property): New function
* hald/device.h: Add prototypes for two new functions
* hald/device_info.c:
(resolve_udiprop_path): New function
(match_compare_property): New function
(handle_match): Allow property names to contain UDI dirct and indirect
references. Add support for 'exists', 'empty', 'is_absolute_path',
'compare_lt', 'compare_le', 'compare_gt', 'compare_ge'
(handle_merge): Add support for 'copy_property'
(handle_append): New function
(start): Support new 'append' operation (like merge)
(end): Also support MERGE_TYPE_COPY_PROPERTY. Fixup compare bug in
match_depth_first_fail that made several matches on the same level
impossible.
(process_fdi_file): Init match_depth_first_fail to -1
* hald/linux/osspec.c (osspec_probe): Add selinux support to
root computer device object.
--- NEW FILE: Makefile.am ---
EXTRA_DIST = storage-policy-examples.fdi
--- NEW FILE: storage-policy-examples.fdi ---
<?xml version="1.0" encoding="ISO-8859-1"?> <!-- -*- SGML -*- -->
<deviceinfo version="0.2">
<!-- Example: Match volumes from an external USB harddisk enclosure by
matching on vendor and model. Use mount points
my_usbdisk_part_<partition-number>
NB: some drives (ieee1394 based IIRC) even export the
property storage.serial, the unique serial number of the
disk which is a better match -->
<device>
<match key="block.is_volume" bool="true">
<match key="volume.fsusage" string="filesystem">
<match key="@block.storage_device:storage.vendor" string="ST360021">
<match key="@block.storage_device:storage.model" string="A">
<merge key="volume.policy.desired_mount_point" type="string">my_usbdisk_partition_</merge>
<append key="volume.policy.desired_mount_point" type="copy_property">volume.partition.number</append>
</match>
</match>
</match>
</match>
</device>
<!-- Example: Match a volume from an USB Storage Based mp3 player
by the file system UUID and assign a mount point.
NB: When reformatting the volume a new UUID will be
used and this rule will have to be altered -->
<device>
<match key="block.is_volume" bool="true">
<match key="volume.fsusage" string="filesystem">
<match key="volume.uuid" string="4150-3F34">
<merge key="volume.policy.desired_mount_point" type="string">my_mp3_player</merge>
</match>
</match>
</match>
</device>
</deviceinfo>
More information about the hal-commit
mailing list