hal: Branch 'master'

David Zeuthen david at kemper.freedesktop.org
Wed Aug 2 20:02:20 PDT 2006


 doc/api/tmpl/hal-unused.sgml     |    7 
 doc/api/tmpl/libhal.sgml         |    8 
 doc/spec/hal-spec-properties.xml |   38 +
 doc/spec/hal-spec.html           | 1108 +++++++++++++++++++++++++++------------
 hald/linux2/blockdev.c           |   43 +
 hald/util.c                      |   51 +
 hald/util.h                      |    4 
 libhal-storage/libhal-storage.c  |   29 -
 libhal-storage/libhal-storage.h  |    3 
 9 files changed, 948 insertions(+), 343 deletions(-)

New commits:
diff-tree 27f93b3320768981b01c155bd3dba18137e6c43e (from 9fd02f953ee4369aa6f7b141e67ae4331ba1fc58)
Author: David Zeuthen <davidz at redhat.com>
Date:   Wed Aug 2 23:02:02 2006 -0400

    add properties required by a hypothetical disk utility and some bug fixes
    
    Don't mark device-mapper as volume.is_partition. Export new properties
    storage.size, volume.partition.start and volume.partition.media_size.
    Also define these in the spec.
    
    Actually make the existing functions libhal_volume_is_partition() and
    libhal_volume_get_partition_number() work. Also add a couple of new
    functions libhal_drive_get_size(), libhal_volume_get_partition_start_offset()
    and libhal_volume_get_partition_media_size().

diff --git a/doc/api/tmpl/hal-unused.sgml b/doc/api/tmpl/hal-unused.sgml
index e4bf5ce..0385907 100644
--- a/doc/api/tmpl/hal-unused.sgml
+++ b/doc/api/tmpl/hal-unused.sgml
@@ -346,6 +346,13 @@ sysfs
 </para>
 
 
+<!-- ##### MACRO LIBHAL_FREE_DBUS_ERROR ##### -->
+<para>
+
+</para>
+
+ at _dbus_error_: 
+
 <!-- ##### TYPEDEF LibHalPolicyContext ##### -->
 <para>
 
diff --git a/doc/api/tmpl/libhal.sgml b/doc/api/tmpl/libhal.sgml
index 8ec53ed..0e83348 100644
--- a/doc/api/tmpl/libhal.sgml
+++ b/doc/api/tmpl/libhal.sgml
@@ -17,14 +17,6 @@ libhal
 <!-- ##### SECTION Stability_Level ##### -->
 
 
-<!-- ##### MACRO LIBHAL_FREE_DBUS_ERROR ##### -->
-<para>
-
-</para>
-
- at _dbus_error_: 
-
-
 <!-- ##### MACRO LIBHAL_CHECK_LIBHALCONTEXT ##### -->
 <para>
 
diff --git a/doc/spec/hal-spec-properties.xml b/doc/spec/hal-spec-properties.xml
index a7c9752..f13b72c 100644
--- a/doc/spec/hal-spec-properties.xml
+++ b/doc/spec/hal-spec-properties.xml
@@ -2339,7 +2339,7 @@
             </row>
             <row>
               <entry>
-                <literal>volume.partition.x86_type</literal> (int)
+                <literal>volume.partition.msdos_part_table_type</literal> (int)
               </entry>
               <entry>examples: 0x83, 0xfd, 0x8e</entry>
               <entry>
@@ -2350,6 +2350,32 @@
                 this volume stems from is using an MS-DOS-style partition table.
               </entry>
             </row>
+            <row>
+              <entry>
+                <literal>volume.partition.media_size</literal> (uint64)
+              </entry>
+              <entry>example: 500107862016</entry>
+              <entry>
+                If, and only if, <literal>volume.is_partition</literal>
+                is set to <literal>TRUE</literal>.
+              </entry>
+              <entry>
+                If available, size of the current media or the fixed disk in the storage device.
+              </entry>
+            </row>
+            <row>
+              <entry>
+                <literal>volume.partition.start</literal> (uint64)
+              </entry>
+              <entry>example: 32256</entry>
+              <entry>
+                If, and only if, <literal>volume.is_partition</literal>
+                is set to <literal>TRUE</literal>.
+              </entry>
+              <entry>
+                If available, the offset where the physical partition starts on the media or the fixed disk in the storage device.
+              </entry>
+            </row>
           </tbody>
         </tgroup>
       </informaltable>
@@ -2862,7 +2888,7 @@
             </row>
             <row>
               <entry>
-                <literal>storage.removable</literal> (bool)
+	        <literal>storage.removable</literal> (bool)
               </entry>
               <entry></entry>
               <entry>Yes</entry>
@@ -2870,6 +2896,14 @@
             </row>
             <row>
               <entry>
+	        <literal>storage.size</literal> (uint64)
+              </entry>
+              <entry></entry>
+              <entry>No</entry>
+              <entry>size in bytes of the storage device - only meaningful if storage.removable is FALSE</entry>
+            </row>
+            <row>
+              <entry>
                 <literal>storage.requires_eject</literal> (bool)
               </entry>
               <entry></entry>
diff --git a/doc/spec/hal-spec.html b/doc/spec/hal-spec.html
index 8b523bf..817f0c6 100644
--- a/doc/spec/hal-spec.html
+++ b/doc/spec/hal-spec.html
@@ -1,4 +1,4 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/loose.dtd">
 <HTML
 ><HEAD
 ><TITLE
@@ -49,6 +49,9 @@ HREF="mailto:david at fubar.dk"
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</P
 ></DIV
 ></DIV
+><SPAN
+CLASS="releaseinfo"
+>Version 0.5.8<BR></SPAN
 ><HR></DIV
 ><DIV
 CLASS="TOC"
@@ -58,65 +61,65 @@ CLASS="TOC"
 >Table of Contents</B
 ></DT
 ><DT
->1. <A
+><A
 HREF="#introduction"
 >Introduction</A
 ></DT
 ><DD
 ><DL
 ><DT
->1.1. <A
+><A
 HREF="#AEN15"
 >About</A
 ></DT
 ><DT
->1.2. <A
+><A
 HREF="#AEN24"
 >Acknowledgements</A
 ></DT
 ><DT
->1.3. <A
+><A
 HREF="#ov_halarch"
 >Architecture of HAL</A
 ></DT
 ><DT
->1.4. <A
+><A
 HREF="#ov_hal_linux26"
 >HAL on Linux 2.6</A
 ></DT
 ><DT
->1.5. <A
+><A
 HREF="#AEN84"
 >Device Objects</A
 ></DT
 ><DT
->1.6. <A
+><A
 HREF="#device-capabilities"
 >Device Capabilities</A
 ></DT
 ><DT
->1.7. <A
+><A
 HREF="#using-devices"
 >Using devices</A
 ></DT
 ></DL
 ></DD
 ><DT
->2. <A
+><A
 HREF="#device-properties"
 >Device Properties</A
 ></DT
 ><DD
 ><DL
 ><DT
->2.1. <A
+><A
 HREF="#properties-metadata"
 >Metadata Properties</A
 ></DT
 ><DD
 ><DL
 ><DT
->2.1.1. <A
+><A
 HREF="#device-properties-info"
 ><TT
 CLASS="literal"
@@ -124,7 +127,7 @@ CLASS="literal"
 > namespace</A
 ></DT
 ><DT
->2.1.2. <A
+><A
 HREF="#device-properties-linux"
 ><TT
 CLASS="literal"
@@ -134,14 +137,14 @@ CLASS="literal"
 ></DL
 ></DD
 ><DT
->2.2. <A
+><A
 HREF="#properties-bus"
 >Physical Properties</A
 ></DT
 ><DD
 ><DL
 ><DT
->2.2.1. <A
+><A
 HREF="#device-properties-pci"
 ><TT
 CLASS="literal"
@@ -149,7 +152,7 @@ CLASS="literal"
 > namespace</A
 ></DT
 ><DT
->2.2.2. <A
+><A
 HREF="#device-properties-serialif"
 ><TT
 CLASS="literal"
@@ -157,7 +160,7 @@ CLASS="literal"
 > namespace</A
 ></DT
 ><DT
->2.2.3. <A
+><A
 HREF="#device-properties-usb"
 ><TT
 CLASS="literal"
@@ -165,7 +168,7 @@ CLASS="literal"
 > namespace</A
 ></DT
 ><DT
->2.2.4. <A
+><A
 HREF="#device-properties-usbif"
 ><TT
 CLASS="literal"
@@ -173,7 +176,7 @@ CLASS="literal"
 > namespace</A
 ></DT
 ><DT
->2.2.5. <A
+><A
 HREF="#device-properties-platform"
 ><TT
 CLASS="literal"
@@ -181,7 +184,7 @@ CLASS="literal"
 > namespace</A
 ></DT
 ><DT
->2.2.6. <A
+><A
 HREF="#device-properties-ide-host"
 ><TT
 CLASS="literal"
@@ -189,7 +192,7 @@ CLASS="literal"
 > namespace</A
 ></DT
 ><DT
->2.2.7. <A
+><A
 HREF="#device-properties-ide"
 ><TT
 CLASS="literal"
@@ -197,7 +200,7 @@ CLASS="literal"
 > namespace</A
 ></DT
 ><DT
->2.2.8. <A
+><A
 HREF="#device-properties-scsi_host"
 ><TT
 CLASS="literal"
@@ -205,7 +208,7 @@ CLASS="literal"
 > namespace</A
 ></DT
 ><DT
->2.2.9. <A
+><A
 HREF="#device-properties-scsi"
 ><TT
 CLASS="literal"
@@ -213,7 +216,7 @@ CLASS="literal"
 > namespace</A
 ></DT
 ><DT
->2.2.10. <A
+><A
 HREF="#device-properties-ieee1394_host"
 ><TT
 CLASS="literal"
@@ -221,7 +224,7 @@ CLASS="literal"
 > namespace</A
 ></DT
 ><DT
->2.2.11. <A
+><A
 HREF="#device-properties-ieee1394_node"
 ><TT
 CLASS="literal"
@@ -229,7 +232,7 @@ CLASS="literal"
 > namespace</A
 ></DT
 ><DT
->2.2.12. <A
+><A
 HREF="#device-properties-ieee1394"
 ><TT
 CLASS="literal"
@@ -237,7 +240,7 @@ CLASS="literal"
 > namespace</A
 ></DT
 ><DT
->2.2.13. <A
+><A
 HREF="#device-properties-mmc_host"
 ><TT
 CLASS="literal"
@@ -245,7 +248,7 @@ CLASS="literal"
 > namespace</A
 ></DT
 ><DT
->2.2.14. <A
+><A
 HREF="#device-properties-mmc"
 ><TT
 CLASS="literal"
@@ -253,7 +256,7 @@ CLASS="literal"
 > namespace</A
 ></DT
 ><DT
->2.2.15. <A
+><A
 HREF="#device-properties-ccw"
 ><TT
 CLASS="literal"
@@ -261,7 +264,7 @@ CLASS="literal"
 > namespace</A
 ></DT
 ><DT
->2.2.16. <A
+><A
 HREF="#device-properties-ccwgroup"
 ><TT
 CLASS="literal"
@@ -269,7 +272,7 @@ CLASS="literal"
 > namespace</A
 ></DT
 ><DT
->2.2.17. <A
+><A
 HREF="#device-properties-iucv"
 ><TT
 CLASS="literal"
@@ -277,24 +280,32 @@ CLASS="literal"
 > namespace</A
 ></DT
 ><DT
->2.2.18. <A
+><A
 HREF="#device-properties-block"
 ><TT
 CLASS="literal"
 >block</TT
 > namespace</A
 ></DT
+><DT
+><A
+HREF="#device-properties-xen"
+><TT
+CLASS="literal"
+>xen</TT
+> namespace</A
+></DT
 ></DL
 ></DD
 ><DT
->2.3. <A
+><A
 HREF="#properties-functional"
 >Functional Properties</A
 ></DT
 ><DD
 ><DL
 ><DT
->2.3.1. <A
+><A
 HREF="#device-properties-volume"
 ><TT
 CLASS="literal"
@@ -302,7 +313,7 @@ CLASS="literal"
 > namespace</A
 ></DT
 ><DT
->2.3.2. <A
+><A
 HREF="#device-properties-kernel"
 ><TT
 CLASS="literal"
@@ -310,7 +321,7 @@ CLASS="literal"
 > namespace</A
 ></DT
 ><DT
->2.3.3. <A
+><A
 HREF="#device-properties-volume-disc"
 ><TT
 CLASS="literal"
@@ -318,7 +329,7 @@ CLASS="literal"
 > namespace</A
 ></DT
 ><DT
->2.3.4. <A
+><A
 HREF="#device-properties-storage"
 ><TT
 CLASS="literal"
@@ -326,7 +337,7 @@ CLASS="literal"
 > namespace</A
 ></DT
 ><DT
->2.3.5. <A
+><A
 HREF="#device-properties-storage-cdrom"
 ><TT
 CLASS="literal"
@@ -334,7 +345,7 @@ CLASS="literal"
 > namespace</A
 ></DT
 ><DT
->2.3.6. <A
+><A
 HREF="#device-properties-net"
 ><TT
 CLASS="literal"
@@ -342,7 +353,7 @@ CLASS="literal"
 > namespace</A
 ></DT
 ><DT
->2.3.7. <A
+><A
 HREF="#device-properties-net-80203"
 ><TT
 CLASS="literal"
@@ -350,7 +361,7 @@ CLASS="literal"
 > namespace</A
 ></DT
 ><DT
->2.3.8. <A
+><A
 HREF="#device-properties-net-80211"
 ><TT
 CLASS="literal"
@@ -358,7 +369,7 @@ CLASS="literal"
 > namespace</A
 ></DT
 ><DT
->2.3.9. <A
+><A
 HREF="#device-properties-input"
 ><TT
 CLASS="literal"
@@ -366,7 +377,7 @@ CLASS="literal"
 > namespace</A
 ></DT
 ><DT
->2.3.10. <A
+><A
 HREF="#device-properties-pcmcia_socket"
 ><TT
 CLASS="literal"
@@ -374,7 +385,7 @@ CLASS="literal"
 ></A
 ></DT
 ><DT
->2.3.11. <A
+><A
 HREF="#device-properties-printer"
 ><TT
 CLASS="literal"
@@ -382,7 +393,7 @@ CLASS="literal"
 > namespace</A
 ></DT
 ><DT
->2.3.12. <A
+><A
 HREF="#device-properties-portable_audio_player"
 ><TT
 CLASS="literal"
@@ -390,7 +401,7 @@ CLASS="literal"
 > namespace</A
 ></DT
 ><DT
->2.3.13. <A
+><A
 HREF="#device-properties-alsa"
 ><TT
 CLASS="literal"
@@ -398,7 +409,7 @@ CLASS="literal"
 > namespace</A
 ></DT
 ><DT
->2.3.14. <A
+><A
 HREF="#device-properties-oss"
 ><TT
 CLASS="literal"
@@ -406,7 +417,7 @@ CLASS="literal"
 > namespace</A
 ></DT
 ><DT
->2.3.15. <A
+><A
 HREF="#device-properties-camera"
 ><TT
 CLASS="literal"
@@ -414,7 +425,7 @@ CLASS="literal"
 > namespace</A
 ></DT
 ><DT
->2.3.16. <A
+><A
 HREF="#device-properties-laptop-panel"
 ><TT
 CLASS="literal"
@@ -422,7 +433,7 @@ CLASS="literal"
 > namespace</A
 ></DT
 ><DT
->2.3.17. <A
+><A
 HREF="#device-properties-video_adapter_pm"
 ><TT
 CLASS="literal"
@@ -430,7 +441,7 @@ CLASS="literal"
 > namespace</A
 ></DT
 ><DT
->2.3.18. <A
+><A
 HREF="#device-properties-ac_adaptor"
 ><TT
 CLASS="literal"
@@ -438,7 +449,7 @@ CLASS="literal"
 > namespace</A
 ></DT
 ><DT
->2.3.19. <A
+><A
 HREF="#device-properties-battery"
 ><TT
 CLASS="literal"
@@ -446,7 +457,7 @@ CLASS="literal"
 > namespace</A
 ></DT
 ><DT
->2.3.20. <A
+><A
 HREF="#device-properties-button"
 ><TT
 CLASS="literal"
@@ -454,7 +465,7 @@ CLASS="literal"
 > namespace</A
 ></DT
 ><DT
->2.3.21. <A
+><A
 HREF="#device-properties-processor"
 ><TT
 CLASS="literal"
@@ -462,7 +473,7 @@ CLASS="literal"
 > namespace</A
 ></DT
 ><DT
->2.3.22. <A
+><A
 HREF="#device-properties-display_device"
 ><TT
 CLASS="literal"
@@ -470,7 +481,7 @@ CLASS="literal"
 > namespace</A
 ></DT
 ><DT
->2.3.23. <A
+><A
 HREF="#device-properties-sensor"
 ><TT
 CLASS="literal"
@@ -478,7 +489,7 @@ CLASS="literal"
 > namespace</A
 ></DT
 ><DT
->2.3.24. <A
+><A
 HREF="#device-properties-power-management"
 ><TT
 CLASS="literal"
@@ -486,7 +497,7 @@ CLASS="literal"
 > namespace</A
 ></DT
 ><DT
->2.3.25. <A
+><A
 HREF="#device-properties-tape"
 ><TT
 CLASS="literal"
@@ -496,14 +507,14 @@ CLASS="literal"
 ></DL
 ></DD
 ><DT
->2.4. <A
+><A
 HREF="#properties-policy"
 >Policy Properties</A
 ></DT
 ><DD
 ><DL
 ><DT
->2.4.1. <A
+><A
 HREF="#device-properties-storage-policy-default"
 ><TT
 CLASS="literal"
@@ -511,7 +522,7 @@ CLASS="literal"
 > namespace</A
 ></DT
 ><DT
->2.4.2. <A
+><A
 HREF="#device-properties-storage-policy"
 ><TT
 CLASS="literal"
@@ -519,7 +530,7 @@ CLASS="literal"
 > namespace</A
 ></DT
 ><DT
->2.4.3. <A
+><A
 HREF="#device-properties-volume-policy"
 ><TT
 CLASS="literal"
@@ -531,45 +542,45 @@ CLASS="literal"
 ></DL
 ></DD
 ><DT
->3. <A
+><A
 HREF="#spec-device-info"
 >Device Information Files</A
 ></DT
 ><DD
 ><DL
 ><DT
->3.1. <A
+><A
 HREF="#fdi-facts"
 >Facts about devices</A
 ></DT
 ><DD
 ><DL
 ><DT
->3.1.1. <A
+><A
 HREF="#fdi-example-mp3player"
 >Example: MP3 player</A
 ></DT
 ><DT
->3.1.2. <A
+><A
 HREF="#fdi-example-camera"
 >Example: Digital Still Camera</A
 ></DT
 ><DT
->3.1.3. <A
+><A
 HREF="#fdi-example-6in1"
 >Example: Card Reader</A
 ></DT
 ></DL
 ></DD
 ><DT
->3.2. <A
+><A
 HREF="#fdi-policy"
 >Policy settings for devices</A
 ></DT
 ><DD
 ><DL
 ><DT
->3.2.1. <A
+><A
 HREF="#fdi-example-mountsetting"
 >Storage Devices</A
 ></DT
@@ -578,45 +589,45 @@ HREF="#fdi-example-mountsetting"
 ></DL
 ></DD
 ><DT
->4. <A
+><A
 HREF="#examples"
 >Examples and other stuff</A
 ></DT
 ><DD
 ><DL
 ><DT
->4.1. <A
+><A
 HREF="#callouts"
 >Callouts</A
 ></DT
 ><DT
->4.2. <A
+><A
 HREF="#dbus-api"
 >D-BUS Network API</A
 ></DT
 ><DD
 ><DL
 ><DT
->4.2.1. <A
-HREF="#AEN3950"
+><A
+HREF="#AEN4006"
 >Interface org.freedesktop.Hal.Manager</A
 ></DT
 ><DT
->4.2.2. <A
-HREF="#AEN3969"
+><A
+HREF="#AEN4025"
 >Interface org.freedesktop.Hal.Device</A
 ></DT
 ></DL
 ></DD
 ><DT
->4.3. <A
+><A
 HREF="#enforcing-policy"
 >Enforcing Policy</A
 ></DT
 ><DD
 ><DL
 ><DT
->4.3.1. <A
+><A
 HREF="#enforcing-stor-vol"
 >Storage Devices</A
 ></DT
@@ -632,14 +643,14 @@ CLASS="chapter"
 ><A
 NAME="introduction"
 ></A
->Chapter 1. Introduction</H1
+>Introduction</H1
 ><DIV
 CLASS="sect1"
 ><H2
 CLASS="sect1"
 ><A
 NAME="AEN15"
->1.1. About</A
+>About</A
 ></H2
 ><P
 >&#13;      This document concerns the specification of HAL which is a
@@ -651,28 +662,19 @@ NAME="AEN15"
       policy.
     </P
 ><P
->&#13;      HAL represents a piece of hardware as a <SPAN
-CLASS="emphasis"
-><I
+>&#13;      HAL represents a piece of hardware as a <I
 CLASS="emphasis"
 >device object</I
-></SPAN
 >.
       A device object is identified by a unique identifer and carries a set of
-      key/value paris referred to as <SPAN
-CLASS="emphasis"
-><I
+      key/value paris referred to as <I
 CLASS="emphasis"
 >device properties</I
-></SPAN
 >.
       Some properties are derived from the actual hardware, some are merged
-      from <SPAN
-CLASS="emphasis"
-><I
+      from <I
 CLASS="emphasis"
 >device information files</I
-></SPAN
 >
       and some are related to the
       actual device configuration. This document specifies the set
@@ -706,7 +708,7 @@ CLASS="sect1"
 CLASS="sect1"
 ><A
 NAME="AEN24"
->1.2. Acknowledgements</A
+>Acknowledgements</A
 ></H2
 ><P
 >&#13;      Havoc Pennington's article
@@ -741,7 +743,7 @@ CLASS="sect1"
 CLASS="sect1"
 ><A
 NAME="ov_halarch"
->1.3. Architecture of HAL</A
+>Architecture of HAL</A
 ></H2
 ><P
 >&#13;      The HAL consists of a number of components as outlined in the
@@ -759,12 +761,9 @@ SRC="hal-arch.png">
 ><UL
 ><LI
 ><P
->&#13;            <SPAN
-CLASS="emphasis"
-><I
+>&#13;            <I
 CLASS="emphasis"
 >HAL daemon</I
-></SPAN
 >
           </P
 ><P
@@ -781,12 +780,9 @@ CLASS="emphasis"
 ></LI
 ><LI
 ><P
->&#13;            <SPAN
-CLASS="emphasis"
-><I
+>&#13;            <I
 CLASS="emphasis"
 >Applications</I
-></SPAN
 >
           </P
 ><P
@@ -819,12 +815,9 @@ CLASS="emphasis"
 ></LI
 ><LI
 ><P
->&#13;            <SPAN
-CLASS="emphasis"
-><I
+>&#13;            <I
 CLASS="emphasis"
 >Callouts</I
-></SPAN
 >
           </P
 ><P
@@ -849,7 +842,11 @@ CLASS="literal"
       easily access the services offered by HAL. The D-BUS API is
       detailed in <A
 HREF="#dbus-api"
->Section 4.2</A
+>the Section called <I
+>D-BUS Network API</I
+> in the Chapter called <I
+>Examples and other stuff</I
+></A
 >
       .
       Note that HAL doesn't
@@ -859,7 +856,11 @@ HREF="#dbus-api"
       environments, recommendations and best practises on how to
       enforce policy is discussed in <A
 HREF="#enforcing-policy"
->Section 4.3</A
+>the Section called <I
+>Enforcing Policy</I
+> in the Chapter called <I
+>Examples and other stuff</I
+></A
 >
       .
     </P
@@ -870,7 +871,7 @@ CLASS="sect1"
 CLASS="sect1"
 ><A
 NAME="ov_hal_linux26"
->1.4. HAL on Linux 2.6</A
+>HAL on Linux 2.6</A
 ></H2
 ><P
 >&#13;      On a Linux 2.6 system HAL is implemented as shown in the diagram
@@ -958,7 +959,11 @@ CLASS="literal"
             or use another setuid mount wrapper.
             See <A
 HREF="#enforcing-policy"
->Section 4.3</A
+>the Section called <I
+>Enforcing Policy</I
+> in the Chapter called <I
+>Examples and other stuff</I
+></A
 >
             for more details.
           </P
@@ -973,7 +978,7 @@ CLASS="sect1"
 CLASS="sect1"
 ><A
 NAME="AEN84"
->1.5. Device Objects</A
+>Device Objects</A
 ></H2
 ><P
 >&#13;      It is important to precisely define the term HAL device
@@ -1032,12 +1037,16 @@ CLASS="literal"
       checking the properties that export the USB vendor and product
       identifiers.  See <A
 HREF="#device-capabilities"
->Section 1.6</A
+>the Section called <I
+>Device Capabilities</I
+></A
 >
       and
       <A
 HREF="#device-properties"
->Chapter 2</A
+>the Chapter called <I
+>Device Properties</I
+></A
 >
       for details.
     </P
@@ -1049,12 +1058,9 @@ HREF="#device-properties"
 ><UL
 ><LI
 ><P
->&#13;          <SPAN
-CLASS="emphasis"
-><I
+>&#13;          <I
 CLASS="emphasis"
 >UDI</I
-></SPAN
 >
         </P
 ><P
@@ -1068,12 +1074,9 @@ CLASS="emphasis"
 ></LI
 ><LI
 ><P
->&#13;          <SPAN
-CLASS="emphasis"
-><I
+>&#13;          <I
 CLASS="emphasis"
 >Properties</I
-></SPAN
 >
         </P
 ><P
@@ -1188,16 +1191,15 @@ CLASS="literal"
       administrator can edit. This specification is concerned with
       precisely defining several properties; see <A
 HREF="#device-properties"
->Chapter 2</A
+>the Chapter called <I
+>Device Properties</I
+></A
 >
       and onwards for more
       information.  As a complement to device properties, HAL also
-      provides <SPAN
-CLASS="emphasis"
-><I
+      provides <I
 CLASS="emphasis"
 >conditions</I
-></SPAN
 > on HAL device
       objects. Conditions are used to relay events that are
       happening on devices which are not easily expressed in
@@ -1241,7 +1243,7 @@ CLASS="sect1"
 CLASS="sect1"
 ><A
 NAME="device-capabilities"
->1.6. Device Capabilities</A
+>Device Capabilities</A
 ></H2
 ><P
 >&#13;      Mainstream hardware isn't very good at reporting what they are,
@@ -1265,29 +1267,20 @@ CLASS="literal"
 CLASS="literal"
 >info.capabilities</TT
 >. The former describes
-      <SPAN
-CLASS="emphasis"
-><I
+      <I
 CLASS="emphasis"
 >what the device is</I
-></SPAN
 > (as a single
       alphanumeric keyword) and the latter describes
-      <SPAN
-CLASS="emphasis"
-><I
+      <I
 CLASS="emphasis"
 >what the device does</I
-></SPAN
 > (as a number of
       alphanumeric keywords separated by whitespace). The keywords
       available for use is defined in this document; we'll refer to
-      them in following simply as <SPAN
-CLASS="emphasis"
-><I
+      them in following simply as <I
 CLASS="emphasis"
 >capabilities</I
-></SPAN
 >.
     </P
 ><P
@@ -1346,7 +1339,7 @@ CLASS="sect1"
 CLASS="sect1"
 ><A
 NAME="using-devices"
->1.7. Using devices</A
+>Using devices</A
 ></H2
 ><P
 >&#13;      While the HAL daemon provides generic operations that apply to
@@ -1392,7 +1385,7 @@ CLASS="chapter"
 ><A
 NAME="device-properties"
 ></A
->Chapter 2. Device Properties</H1
+>Device Properties</H1
 ><P
 >&#13;    Properties are arranged in a namespaces using ''.'' as a separator
     and are key/value pairs. The value may assume different types; currently
@@ -1406,7 +1399,7 @@ CLASS="sect1"
 CLASS="sect1"
 ><A
 NAME="properties-metadata"
->2.1. Metadata Properties</A
+>Metadata Properties</A
 ></H2
 ><P
 >&#13;      The section represents properties that aren't tied to either
@@ -1419,7 +1412,7 @@ CLASS="sect2"
 CLASS="sect2"
 ><A
 NAME="device-properties-info"
->2.1.1. <TT
+><TT
 CLASS="literal"
 >info</TT
 > namespace</A
@@ -1441,8 +1434,11 @@ NAME="AEN178"
 ></A
 ><TABLE
 BORDER="1"
+BGCOLOR="#E0E0E0"
+CELLSPACING="0"
+CELLPADDING="4"
 CLASS="CALSTABLE"
-><COL><COL><THEAD
+><THEAD
 ><TR
 ><TH
 >Key (type)</TH
@@ -1672,7 +1668,7 @@ CLASS="sect2"
 CLASS="sect2"
 ><A
 NAME="device-properties-linux"
->2.1.2. <TT
+><TT
 CLASS="literal"
 >linux</TT
 > namespace</A
@@ -1690,8 +1686,11 @@ NAME="AEN269"
 ></A
 ><TABLE
 BORDER="1"
+BGCOLOR="#E0E0E0"
+CELLSPACING="0"
+CELLPADDING="4"
 CLASS="CALSTABLE"
-><COL><COL><THEAD
+><THEAD
 ><TR
 ><TH
 >Key (type)</TH
@@ -1813,7 +1812,7 @@ CLASS="sect1"
 CLASS="sect1"
 ><A
 NAME="properties-bus"
->2.2. Physical Properties</A
+>Physical Properties</A
 ></H2
 ><P
 >&#13;      In this section properties for device objects that represent
@@ -1834,7 +1833,7 @@ CLASS="sect2"
 CLASS="sect2"
 ><A
 NAME="device-properties-pci"
->2.2.1. <TT
+><TT
 CLASS="literal"
 >pci</TT
 > namespace</A
@@ -1859,8 +1858,11 @@ NAME="AEN325"
 ></A
 ><TABLE
 BORDER="1"
+BGCOLOR="#E0E0E0"
+CELLSPACING="0"
+CELLPADDING="4"
 CLASS="CALSTABLE"
-><COL><COL><THEAD
+><THEAD
 ><TR
 ><TH
 >Key (type)</TH
@@ -2061,7 +2063,7 @@ CLASS="sect2"
 CLASS="sect2"
 ><A
 NAME="device-properties-serialif"
->2.2.2. <TT
+><TT
 CLASS="literal"
 >serial</TT
 > namespace</A
@@ -2079,8 +2081,11 @@ NAME="AEN412"
 ></A
 ><TABLE
 BORDER="1"
+BGCOLOR="#E0E0E0"
+CELLSPACING="0"
+CELLPADDING="4"
 CLASS="CALSTABLE"
-><COL><COL><THEAD
+><THEAD
 ><TR
 ><TH
 >Key (type)</TH
@@ -2170,7 +2175,7 @@ CLASS="sect2"
 CLASS="sect2"
 ><A
 NAME="device-properties-usb"
->2.2.3. <TT
+><TT
 CLASS="literal"
 >usb_device</TT
 > namespace</A
@@ -2197,8 +2202,11 @@ NAME="AEN453"
 ></A
 ><TABLE
 BORDER="1"
+BGCOLOR="#E0E0E0"
+CELLSPACING="0"
+CELLPADDING="4"
 CLASS="CALSTABLE"
-><COL><COL><THEAD
+><THEAD
 ><TR
 ><TH
 >Key (type)</TH
@@ -2577,7 +2585,7 @@ CLASS="sect2"
 CLASS="sect2"
 ><A
 NAME="device-properties-usbif"
->2.2.4. <TT
+><TT
 CLASS="literal"
 >usb</TT
 > namespace</A
@@ -2615,8 +2623,11 @@ NAME="AEN616"
 ></A
 ><TABLE
 BORDER="1"
+BGCOLOR="#E0E0E0"
+CELLSPACING="0"
+CELLPADDING="4"
 CLASS="CALSTABLE"
-><COL><COL><THEAD
+><THEAD
 ><TR
 ><TH
 >Key (type)</TH
@@ -2715,7 +2726,7 @@ CLASS="sect2"
 CLASS="sect2"
 ><A
 NAME="device-properties-platform"
->2.2.5. <TT
+><TT
 CLASS="literal"
 >platform</TT
 > namespace</A
@@ -2742,8 +2753,11 @@ NAME="AEN662"
 ></A
 ><TABLE
 BORDER="1"
+BGCOLOR="#E0E0E0"
+CELLSPACING="0"
+CELLPADDING="4"
 CLASS="CALSTABLE"
-><COL><COL><THEAD
+><THEAD
 ><TR
 ><TH
 >Key (type)</TH
@@ -2782,7 +2796,7 @@ CLASS="sect2"
 CLASS="sect2"
 ><A
 NAME="device-properties-ide-host"
->2.2.6. <TT
+><TT
 CLASS="literal"
 >ide_host</TT
 > namespace</A
@@ -2812,8 +2826,11 @@ NAME="AEN684"
 ></A
 ><TABLE
 BORDER="1"
+BGCOLOR="#E0E0E0"
+CELLSPACING="0"
+CELLPADDING="4"
 CLASS="CALSTABLE"
-><COL><COL><THEAD
+><THEAD
 ><TR
 ><TH
 >Key (type)</TH
@@ -2870,7 +2887,7 @@ CLASS="sect2"
 CLASS="sect2"
 ><A
 NAME="device-properties-ide"
->2.2.7. <TT
+><TT
 CLASS="literal"
 >ide</TT
 > namespace</A
@@ -2895,8 +2912,11 @@ NAME="AEN712"
 ></A
 ><TABLE
 BORDER="1"
+BGCOLOR="#E0E0E0"
+CELLSPACING="0"
+CELLPADDING="4"
 CLASS="CALSTABLE"
-><COL><COL><THEAD
+><THEAD
 ><TR
 ><TH
 >Key (type)</TH
@@ -2959,7 +2979,7 @@ CLASS="sect2"
 CLASS="sect2"
 ><A
 NAME="device-properties-scsi_host"
->2.2.8. <TT
+><TT
 CLASS="literal"
 >scsi_host</TT
 > namespace</A
@@ -2989,8 +3009,11 @@ NAME="AEN742"
 ></A
 ><TABLE
 BORDER="1"
+BGCOLOR="#E0E0E0"
+CELLSPACING="0"
+CELLPADDING="4"
 CLASS="CALSTABLE"
-><COL><COL><THEAD
+><THEAD
 ><TR
 ><TH
 >Key (type)</TH
@@ -3029,7 +3052,7 @@ CLASS="sect2"
 CLASS="sect2"
 ><A
 NAME="device-properties-scsi"
->2.2.9. <TT
+><TT
 CLASS="literal"
 >scsi</TT
 > namespace</A
@@ -3054,8 +3077,11 @@ NAME="AEN763"
 ></A
 ><TABLE
 BORDER="1"
+BGCOLOR="#E0E0E0"
+CELLSPACING="0"
+CELLPADDING="4"
 CLASS="CALSTABLE"
-><COL><COL><THEAD
+><THEAD
 ><TR
 ><TH
 >Key (type)</TH
@@ -3145,7 +3171,7 @@ CLASS="sect2"
 CLASS="sect2"
 ><A
 NAME="device-properties-ieee1394_host"
->2.2.10. <TT
+><TT
 CLASS="literal"
 >ieee1394_host</TT
 > namespace</A
@@ -3171,8 +3197,11 @@ NAME="AEN804"
 ></A
 ><TABLE
 BORDER="1"
+BGCOLOR="#E0E0E0"
+CELLSPACING="0"
+CELLPADDING="4"
 CLASS="CALSTABLE"
-><COL><COL><THEAD
+><THEAD
 ><TR
 ><TH
 >Key (type)</TH
@@ -3267,7 +3296,7 @@ CLASS="sect2"
 CLASS="sect2"
 ><A
 NAME="device-properties-ieee1394_node"
->2.2.11. <TT
+><TT
 CLASS="literal"
 >ieee1394_node</TT
 > namespace</A
@@ -3293,8 +3322,11 @@ NAME="AEN849"
 ></A
 ><TABLE
 BORDER="1"
+BGCOLOR="#E0E0E0"
+CELLSPACING="0"
+CELLPADDING="4"
 CLASS="CALSTABLE"
-><COL><COL><THEAD
+><THEAD
 ><TR
 ><TH
 >Key (type)</TH
@@ -3389,7 +3421,7 @@ CLASS="sect2"
 CLASS="sect2"
 ><A
 NAME="device-properties-ieee1394"
->2.2.12. <TT
+><TT
 CLASS="literal"
 >ieee1394</TT
 > namespace</A
@@ -3414,8 +3446,11 @@ NAME="AEN894"
 ></A
 ><TABLE
 BORDER="1"
+BGCOLOR="#E0E0E0"
+CELLSPACING="0"
+CELLPADDING="4"
 CLASS="CALSTABLE"
-><COL><COL><THEAD
+><THEAD
 ><TR
 ><TH
 >Key (type)</TH
@@ -3454,7 +3489,7 @@ CLASS="sect2"
 CLASS="sect2"
 ><A
 NAME="device-properties-mmc_host"
->2.2.13. <TT
+><TT
 CLASS="literal"
 >mmc_host</TT
 > namespace</A
@@ -3480,8 +3515,11 @@ NAME="AEN915"
 ></A
 ><TABLE
 BORDER="1"
+BGCOLOR="#E0E0E0"
+CELLSPACING="0"
+CELLPADDING="4"
 CLASS="CALSTABLE"
-><COL><COL><THEAD
+><THEAD
 ><TR
 ><TH
 >Key (type)</TH
@@ -3520,7 +3558,7 @@ CLASS="sect2"
 CLASS="sect2"
 ><A
 NAME="device-properties-mmc"
->2.2.14. <TT
+><TT
 CLASS="literal"
 >mmc</TT
 > namespace</A
@@ -3546,8 +3584,11 @@ NAME="AEN936"
 ></A
 ><TABLE
 BORDER="1"
+BGCOLOR="#E0E0E0"
+CELLSPACING="0"
+CELLPADDING="4"
 CLASS="CALSTABLE"
-><COL><COL><THEAD
+><THEAD
 ><TR
 ><TH
 >Key (type)</TH
@@ -3700,7 +3741,7 @@ CLASS="sect2"
 CLASS="sect2"
 ><A
 NAME="device-properties-ccw"
->2.2.15. <TT
+><TT
 CLASS="literal"
 >ccw</TT
 > namespace</A
@@ -3726,8 +3767,11 @@ NAME="AEN1005"
 ></A
 ><TABLE
 BORDER="1"
+BGCOLOR="#E0E0E0"
+CELLSPACING="0"
+CELLPADDING="4"
 CLASS="CALSTABLE"
-><COL><COL><THEAD
+><THEAD
 ><TR
 ><TH
 >Key (type)</TH
@@ -3913,8 +3957,11 @@ NAME="AEN1079"
 ></A
 ><TABLE
 BORDER="1"
+BGCOLOR="#E0E0E0"
+CELLSPACING="0"
+CELLPADDING="4"
 CLASS="CALSTABLE"
-><COL><COL><THEAD
+><THEAD
 ><TR
 ><TH
 >Key (type)</TH
@@ -4002,8 +4049,11 @@ NAME="AEN1111"
 ></A
 ><TABLE
 BORDER="1"
+BGCOLOR="#E0E0E0"
+CELLSPACING="0"
+CELLPADDING="4"
 CLASS="CALSTABLE"
-><COL><COL><THEAD
+><THEAD
 ><TR
 ><TH
 >Key (type)</TH
@@ -4073,8 +4123,11 @@ NAME="AEN1136"
 ></A
 ><TABLE
 BORDER="1"
+BGCOLOR="#E0E0E0"
+CELLSPACING="0"
+CELLPADDING="4"
 CLASS="CALSTABLE"
-><COL><COL><THEAD
+><THEAD
 ><TR
 ><TH
 >Key (type)</TH
@@ -4181,8 +4234,11 @@ NAME="AEN1175"
 ></A
 ><TABLE
 BORDER="1"
+BGCOLOR="#E0E0E0"
+CELLSPACING="0"
+CELLPADDING="4"
 CLASS="CALSTABLE"
-><COL><COL><THEAD
+><THEAD
 ><TR
 ><TH
 >Key (type)</TH
@@ -4250,7 +4306,7 @@ CLASS="sect2"
 CLASS="sect2"
 ><A
 NAME="device-properties-ccwgroup"
->2.2.16. <TT
+><TT
 CLASS="literal"
 >ccwgroup</TT
 > namespace</A
@@ -4278,8 +4334,11 @@ NAME="AEN1209"
 ></A
 ><TABLE
 BORDER="1"
+BGCOLOR="#E0E0E0"
+CELLSPACING="0"
+CELLPADDING="4"
 CLASS="CALSTABLE"
-><COL><COL><THEAD
+><THEAD
 ><TR
 ><TH
 >Key (type)</TH
@@ -4347,8 +4406,11 @@ NAME="AEN1234"
 ></A
 ><TABLE
 BORDER="1"
+BGCOLOR="#E0E0E0"
+CELLSPACING="0"
+CELLPADDING="4"
 CLASS="CALSTABLE"
-><COL><COL><THEAD
+><THEAD
 ><TR
 ><TH
 >Key (type)</TH
@@ -4629,8 +4691,11 @@ NAME="AEN1343"
 ></A
 ><TABLE
 BORDER="1"
+BGCOLOR="#E0E0E0"
+CELLSPACING="0"
+CELLPADDING="4"
 CLASS="CALSTABLE"
-><COL><COL><THEAD
+><THEAD
 ><TR
 ><TH
 >Key (type)</TH
@@ -4712,8 +4777,11 @@ NAME="AEN1374"
 ></A
 ><TABLE
 BORDER="1"
+BGCOLOR="#E0E0E0"
+CELLSPACING="0"
+CELLPADDING="4"
 CLASS="CALSTABLE"
-><COL><COL><THEAD
+><THEAD
 ><TR
 ><TH
 >Key (type)</TH
@@ -4795,8 +4863,11 @@ NAME="AEN1405"
 ></A
 ><TABLE
 BORDER="1"
+BGCOLOR="#E0E0E0"
+CELLSPACING="0"
+CELLPADDING="4"
 CLASS="CALSTABLE"
-><COL><COL><THEAD
+><THEAD
 ><TR
 ><TH
 >Key (type)</TH
@@ -4923,7 +4994,7 @@ CLASS="sect2"
 CLASS="sect2"
 ><A
 NAME="device-properties-iucv"
->2.2.17. <TT
+><TT
 CLASS="literal"
 >iucv</TT
 > namespace</A
@@ -4949,8 +5020,11 @@ NAME="AEN1465"
 ></A
 ><TABLE
 BORDER="1"
+BGCOLOR="#E0E0E0"
+CELLSPACING="0"
+CELLPADDING="4"
 CLASS="CALSTABLE"
-><COL><COL><THEAD
+><THEAD
 ><TR
 ><TH
 >Key (type)</TH
@@ -5004,8 +5078,11 @@ NAME="AEN1484"
 ></A
 ><TABLE
 BORDER="1"
+BGCOLOR="#E0E0E0"
+CELLSPACING="0"
+CELLPADDING="4"
 CLASS="CALSTABLE"
-><COL><COL><THEAD
+><THEAD
 ><TR
 ><TH
 >Key (type)</TH
@@ -5058,7 +5135,7 @@ CLASS="sect2"
 CLASS="sect2"
 ><A
 NAME="device-properties-block"
->2.2.18. <TT
+><TT
 CLASS="literal"
 >block</TT
 > namespace</A
@@ -5087,8 +5164,11 @@ NAME="AEN1512"
 ></A
 ><TABLE
 BORDER="1"
+BGCOLOR="#E0E0E0"
+CELLSPACING="0"
+CELLPADDING="4"
 CLASS="CALSTABLE"
-><COL><COL><THEAD
+><THEAD
 ><TR
 ><TH
 >Key (type)</TH
@@ -5227,6 +5307,104 @@ CLASS="literal"
 ></P
 ></DIV
 ></DIV
+><DIV
+CLASS="sect2"
+><HR><H3
+CLASS="sect2"
+><A
+NAME="device-properties-xen"
+><TT
+CLASS="literal"
+>xen</TT
+> namespace</A
+></H3
+><P
+>&#13;	Device objects representing virtual devices under the Xen
+	Virtual Machine Monitor, such as frontend network or block
+	devices, will have <TT
+CLASS="literal"
+>info.bus</TT
+> set to
+	<TT
+CLASS="literal"
+>block</TT
+> and will export a number of
+	properties in then <TT
+CLASS="literal"
+>xen</TT
+> namespace.
+      </P
+><DIV
+CLASS="informaltable"
+><P
+></P
+><A
+NAME="AEN1568"
+></A
+><TABLE
+BORDER="1"
+BGCOLOR="#E0E0E0"
+CELLSPACING="0"
+CELLPADDING="4"
+CLASS="CALSTABLE"
+><THEAD
+><TR
+><TH
+>Key (type)</TH
+><TH
+>Values</TH
+><TH
+>Mandatory</TH
+><TH
+>Description</TH
+></TR
+></THEAD
+><TBODY
+><TR
+><TD
+><TT
+CLASS="literal"
+>xen.bus_id</TT
+> (string)</TD
+><TD
+>example: vif-0 </TD
+><TD
+>Yes</TD
+><TD
+>The XenBus ID of the device</TD
+></TR
+><TR
+><TD
+><TT
+CLASS="literal"
+>xen.path</TT
+> (string)</TD
+><TD
+>example: device/vif/0 </TD
+><TD
+>Yes</TD
+><TD
+>The XenBus path of the device</TD
+></TR
+><TR
+><TD
+><TT
+CLASS="literal"
+>xen.type</TT
+> (string)</TD
+><TD
+>example: vif</TD
+><TD
+>Yes</TD
+><TD
+>The type of Xen device</TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+></DIV
+></DIV
 ></DIV
 ><DIV
 CLASS="sect1"
@@ -5234,7 +5412,7 @@ CLASS="sect1"
 CLASS="sect1"
 ><A
 NAME="properties-functional"
->2.3. Functional Properties</A
+>Functional Properties</A
 ></H2
 ><P
 >&#13;      The section describe functional properties of device objects,
@@ -5251,7 +5429,7 @@ CLASS="sect2"
 CLASS="sect2"
 ><A
 NAME="device-properties-volume"
->2.3.1. <TT
+><TT
 CLASS="literal"
 >volume</TT
 > namespace</A
@@ -5282,12 +5460,15 @@ CLASS="informaltable"
 ><P
 ></P
 ><A
-NAME="AEN1572"
+NAME="AEN1606"
 ></A
 ><TABLE
 BORDER="1"
+BGCOLOR="#E0E0E0"
+CELLSPACING="0"
+CELLPADDING="4"
 CLASS="CALSTABLE"
-><COL><COL><THEAD
+><THEAD
 ><TR
 ><TH
 >Key (type)</TH
@@ -5597,7 +5778,7 @@ CLASS="literal"
 ><TD
 >&#13;                <TT
 CLASS="literal"
->volume.partition.x86_type</TT
+>volume.partition.msdos_part_table_type</TT
 > (int)
               </TD
 ><TD
@@ -5610,6 +5791,52 @@ CLASS="literal"
                 this volume stems from is using an MS-DOS-style partition table.
               </TD
 ></TR
+><TR
+><TD
+>&#13;                <TT
+CLASS="literal"
+>volume.partition.drive_size</TT
+> (uint64)
+              </TD
+><TD
+>example: 500107862016</TD
+><TD
+>&#13;                If, and only if, <TT
+CLASS="literal"
+>volume.is_partition</TT
+>
+                is set to <TT
+CLASS="literal"
+>TRUE</TT
+>.
+              </TD
+><TD
+>&#13;                If available, size of the current media or the fixed disk in the storage device.
+              </TD
+></TR
+><TR
+><TD
+>&#13;                <TT
+CLASS="literal"
+>volume.partition.start</TT
+> (uint64)
+              </TD
+><TD
+>example: 32256</TD
+><TD
+>&#13;                If, and only if, <TT
+CLASS="literal"
+>volume.is_partition</TT
+>
+                is set to <TT
+CLASS="literal"
+>TRUE</TT
+>.
+              </TD
+><TD
+>&#13;                If available, the offset where the physical partition starts on the media or the fixed disk in the storage device.
+              </TD
+></TR
 ></TBODY
 ></TABLE
 ><P
@@ -5624,12 +5851,15 @@ CLASS="informaltable"
 ><P
 ></P
 ><A
-NAME="AEN1707"
+NAME="AEN1757"
 ></A
 ><TABLE
 BORDER="1"
+BGCOLOR="#E0E0E0"
+CELLSPACING="0"
+CELLPADDING="4"
 CLASS="CALSTABLE"
-><COL><COL><THEAD
+><THEAD
 ><TR
 ><TH
 >Condition Name</TH
@@ -5746,7 +5976,7 @@ CLASS="sect2"
 CLASS="sect2"
 ><A
 NAME="device-properties-kernel"
->2.3.2. <TT
+><TT
 CLASS="literal"
 >system</TT
 > namespace</A
@@ -5761,12 +5991,15 @@ CLASS="informaltable"
 ><P
 ></P
 ><A
-NAME="AEN1750"
+NAME="AEN1800"
 ></A
 ><TABLE
 BORDER="1"
+BGCOLOR="#E0E0E0"
+CELLSPACING="0"
+CELLPADDING="4"
 CLASS="CALSTABLE"
-><COL><COL><THEAD
+><THEAD
 ><TR
 ><TH
 >Key (type)</TH
@@ -5910,7 +6143,7 @@ CLASS="sect2"
 CLASS="sect2"
 ><A
 NAME="device-properties-volume-disc"
->2.3.3. <TT
+><TT
 CLASS="literal"
 >volume.disc</TT
 > namespace</A
@@ -5932,12 +6165,15 @@ CLASS="informaltable"
 ><P
 ></P
 ><A
-NAME="AEN1808"
+NAME="AEN1858"
 ></A
 ><TABLE
 BORDER="1"
+BGCOLOR="#E0E0E0"
+CELLSPACING="0"
+CELLPADDING="4"
 CLASS="CALSTABLE"
-><COL><COL><THEAD
+><THEAD
 ><TR
 ><TH
 >Key (type)</TH
@@ -6262,7 +6498,7 @@ CLASS="sect2"
 CLASS="sect2"
 ><A
 NAME="device-properties-storage"
->2.3.4. <TT
+><TT
 CLASS="literal"
 >storage</TT
 > namespace</A
@@ -6311,12 +6547,15 @@ CLASS="informaltable"
 ><P
 ></P
 ><A
-NAME="AEN1969"
+NAME="AEN2019"
 ></A
 ><TABLE
 BORDER="1"
+BGCOLOR="#E0E0E0"
+CELLSPACING="0"
+CELLPADDING="4"
 CLASS="CALSTABLE"
-><COL><COL><THEAD
+><THEAD
 ><TR
 ><TH
 >Key (type)</TH
@@ -6528,7 +6767,7 @@ CLASS="literal"
 ></TR
 ><TR
 ><TD
->&#13;                <TT
+>&#13;	        <TT
 CLASS="literal"
 >storage.removable</TT
 > (bool)
@@ -6542,6 +6781,20 @@ CLASS="literal"
 ></TR
 ><TR
 ><TD
+>&#13;	        <TT
+CLASS="literal"
+>storage.size</TT
+> (uint64)
+              </TD
+><TD
+>&nbsp;</TD
+><TD
+>No</TD
+><TD
+>size in bytes of the storage device - only meaningful if storage.removable is FALSE</TD
+></TR
+><TR
+><TD
 >&#13;                <TT
 CLASS="literal"
 >storage.requires_eject</TT
@@ -6660,7 +6913,11 @@ CLASS="literal"
 >.
                 See <A
 HREF="#fdi-example-6in1"
->Section 3.1.3</A
+>the Section called <I
+>Example: Card Reader</I
+> in the Chapter called <I
+>Device Information Files</I
+></A
 > for an example.
               </TD
 ></TR
@@ -6778,7 +7035,7 @@ CLASS="sect2"
 CLASS="sect2"
 ><A
 NAME="device-properties-storage-cdrom"
->2.3.5. <TT
+><TT
 CLASS="literal"
 >storage.cdrom</TT
 > namespace</A
@@ -6805,12 +7062,15 @@ CLASS="informaltable"
 ><P
 ></P
 ><A
-NAME="AEN2163"
+NAME="AEN2219"
 ></A
 ><TABLE
 BORDER="1"
+BGCOLOR="#E0E0E0"
+CELLSPACING="0"
+CELLPADDING="4"
 CLASS="CALSTABLE"
-><COL><COL><THEAD
+><THEAD
 ><TR
 ><TH
 >Key (type)</TH
@@ -7115,7 +7375,7 @@ CLASS="sect2"
 CLASS="sect2"
 ><A
 NAME="device-properties-net"
->2.3.6. <TT
+><TT
 CLASS="literal"
 >net</TT
 > namespace</A
@@ -7136,12 +7396,15 @@ CLASS="informaltable"
 ><P
 ></P
 ><A
-NAME="AEN2297"
+NAME="AEN2353"
 ></A
 ><TABLE
 BORDER="1"
+BGCOLOR="#E0E0E0"
+CELLSPACING="0"
+CELLPADDING="4"
 CLASS="CALSTABLE"
-><COL><COL><THEAD
+><THEAD
 ><TR
 ><TH
 >Key (type)</TH
@@ -7266,7 +7529,7 @@ CLASS="sect2"
 CLASS="sect2"
 ><A
 NAME="device-properties-net-80203"
->2.3.7. <TT
+><TT
 CLASS="literal"
 >net.80203</TT
 > namespace</A
@@ -7293,12 +7556,15 @@ CLASS="informaltable"
 ><P
 ></P
 ><A
-NAME="AEN2355"
+NAME="AEN2411"
 ></A
 ><TABLE
 BORDER="1"
+BGCOLOR="#E0E0E0"
+CELLSPACING="0"
+CELLPADDING="4"
 CLASS="CALSTABLE"
-><COL><COL><THEAD
+><THEAD
 ><TR
 ><TH
 >Key (type)</TH
@@ -7399,7 +7665,7 @@ CLASS="sect2"
 CLASS="sect2"
 ><A
 NAME="device-properties-net-80211"
->2.3.8. <TT
+><TT
 CLASS="literal"
 >net.80211</TT
 > namespace</A
@@ -7426,12 +7692,15 @@ CLASS="informaltable"
 ><P
 ></P
 ><A
-NAME="AEN2397"
+NAME="AEN2453"
 ></A
 ><TABLE
 BORDER="1"
+BGCOLOR="#E0E0E0"
+CELLSPACING="0"
+CELLPADDING="4"
 CLASS="CALSTABLE"
-><COL><COL><THEAD
+><THEAD
 ><TR
 ><TH
 >Key (type)</TH
@@ -7476,7 +7745,7 @@ CLASS="sect2"
 CLASS="sect2"
 ><A
 NAME="device-properties-input"
->2.3.9. <TT
+><TT
 CLASS="literal"
 >input</TT
 > namespace</A
@@ -7495,12 +7764,15 @@ CLASS="informaltable"
 ><P
 ></P
 ><A
-NAME="AEN2419"
+NAME="AEN2475"
 ></A
 ><TABLE
 BORDER="1"
+BGCOLOR="#E0E0E0"
+CELLSPACING="0"
+CELLPADDING="4"
 CLASS="CALSTABLE"
-><COL><COL><THEAD
+><THEAD
 ><TR
 ><TH
 >Key (type)</TH
@@ -7539,7 +7811,7 @@ CLASS="sect2"
 CLASS="sect2"
 ><A
 NAME="device-properties-pcmcia_socket"
->2.3.10. <TT
+><TT
 CLASS="literal"
 >pcmcia_socket namespace</TT
 ></A
@@ -7558,12 +7830,15 @@ CLASS="informaltable"
 ><P
 ></P
 ><A
-NAME="AEN2439"
+NAME="AEN2495"
 ></A
 ><TABLE
 BORDER="1"
+BGCOLOR="#E0E0E0"
+CELLSPACING="0"
+CELLPADDING="4"
 CLASS="CALSTABLE"
-><COL><COL><THEAD
+><THEAD
 ><TR
 ><TH
 >Key (type)</TH
@@ -7602,7 +7877,7 @@ CLASS="sect2"
 CLASS="sect2"
 ><A
 NAME="device-properties-printer"
->2.3.11. <TT
+><TT
 CLASS="literal"
 >printer</TT
 > namespace</A
@@ -7619,12 +7894,15 @@ CLASS="informaltable"
 ><P
 ></P
 ><A
-NAME="AEN2459"
+NAME="AEN2515"
 ></A
 ><TABLE
 BORDER="1"
+BGCOLOR="#E0E0E0"
+CELLSPACING="0"
+CELLPADDING="4"
 CLASS="CALSTABLE"
-><COL><COL><THEAD
+><THEAD
 ><TR
 ><TH
 >Key (type)</TH
@@ -7733,7 +8011,7 @@ CLASS="sect2"
 CLASS="sect2"
 ><A
 NAME="device-properties-portable_audio_player"
->2.3.12. <TT
+><TT
 CLASS="literal"
 >portable_audio_player</TT
 > namespace</A
@@ -7760,12 +8038,15 @@ CLASS="informaltable"
 ><P
 ></P
 ><A
-NAME="AEN2509"
+NAME="AEN2565"
 ></A
 ><TABLE
 BORDER="1"
+BGCOLOR="#E0E0E0"
+CELLSPACING="0"
+CELLPADDING="4"
 CLASS="CALSTABLE"
-><COL><COL><THEAD
+><THEAD
 ><TR
 ><TH
 >Key (type)</TH
@@ -7879,11 +8160,11 @@ CLASS="literal"
 >No</TD
 ><TD
 >&#13;                If portable_audio_player.access_method = "storage",
-                this tells applications how deep of directory hierarchies
-                files can be placed in.  If all files are put in a
-                sub-folder (with the audio_folders property), that folder
-                should not be included in the folder_depth.  If the device
-                does not have a limit, do not set this property.
+                this tells applications exactly how deep of directory hierarchies
+                files should be placed in.  If all files are put in a
+                sub-folder (with the audio_folders property), only the depth within
+                that sub-folder should be entered here. If the device does not have
+                a limit, do not set this property.
               </TD
 ></TR
 ><TR
@@ -7955,7 +8236,7 @@ CLASS="sect2"
 CLASS="sect2"
 ><A
 NAME="device-properties-alsa"
->2.3.13. <TT
+><TT
 CLASS="literal"
 >alsa</TT
 > namespace</A
@@ -7972,12 +8253,15 @@ CLASS="informaltable"
 ><P
 ></P
 ><A
-NAME="AEN2581"
+NAME="AEN2637"
 ></A
 ><TABLE
 BORDER="1"
+BGCOLOR="#E0E0E0"
+CELLSPACING="0"
+CELLPADDING="4"
 CLASS="CALSTABLE"
-><COL><COL><THEAD
+><THEAD
 ><TR
 ><TH
 >Key (type)</TH
@@ -8210,7 +8494,7 @@ CLASS="sect2"
 CLASS="sect2"
 ><A
 NAME="device-properties-oss"
->2.3.14. <TT
+><TT
 CLASS="literal"
 >oss</TT
 > namespace</A
@@ -8233,12 +8517,15 @@ CLASS="informaltable"
 ><P
 ></P
 ><A
-NAME="AEN2677"
+NAME="AEN2733"
 ></A
 ><TABLE
 BORDER="1"
+BGCOLOR="#E0E0E0"
+CELLSPACING="0"
+CELLPADDING="4"
 CLASS="CALSTABLE"
-><COL><COL><THEAD
+><THEAD
 ><TR
 ><TH
 >Key (type)</TH
@@ -8455,7 +8742,7 @@ CLASS="sect2"
 CLASS="sect2"
 ><A
 NAME="device-properties-camera"
->2.3.15. <TT
+><TT
 CLASS="literal"
 >camera</TT
 > namespace</A
@@ -8482,12 +8769,15 @@ CLASS="informaltable"
 ><P
 ></P
 ><A
-NAME="AEN2766"
+NAME="AEN2822"
 ></A
 ><TABLE
 BORDER="1"
+BGCOLOR="#E0E0E0"
+CELLSPACING="0"
+CELLPADDING="4"
 CLASS="CALSTABLE"
-><COL><COL><THEAD
+><THEAD
 ><TR
 ><TH
 >Key (type)</TH
@@ -8583,7 +8873,7 @@ CLASS="sect2"
 CLASS="sect2"
 ><A
 NAME="device-properties-laptop-panel"
->2.3.16. <TT
+><TT
 CLASS="literal"
 >laptop_panel</TT
 > namespace</A
@@ -8600,12 +8890,15 @@ CLASS="informaltable"
 ><P
 ></P
 ><A
-NAME="AEN2808"
+NAME="AEN2864"
 ></A
 ><TABLE
 BORDER="1"
+BGCOLOR="#E0E0E0"
+CELLSPACING="0"
+CELLPADDING="4"
 CLASS="CALSTABLE"
-><COL><COL><THEAD
+><THEAD
 ><TR
 ><TH
 >Key (type)</TH
@@ -8685,12 +8978,15 @@ CLASS="informaltable"
 ><P
 ></P
 ><A
-NAME="AEN2837"
+NAME="AEN2893"
 ></A
 ><TABLE
 BORDER="1"
+BGCOLOR="#E0E0E0"
+CELLSPACING="0"
+CELLPADDING="4"
 CLASS="CALSTABLE"
-><COL><COL><THEAD
+><THEAD
 ><TR
 ><TH
 >Method (parameter types)</TH
@@ -8761,7 +9057,7 @@ CLASS="sect2"
 CLASS="sect2"
 ><A
 NAME="device-properties-video_adapter_pm"
->2.3.17. <TT
+><TT
 CLASS="literal"
 >video_adapter_pm</TT
 > namespace</A
@@ -8779,12 +9075,15 @@ CLASS="informaltable"
 ><P
 ></P
 ><A
-NAME="AEN2865"
+NAME="AEN2921"
 ></A
 ><TABLE
 BORDER="1"
+BGCOLOR="#E0E0E0"
+CELLSPACING="0"
+CELLPADDING="4"
 CLASS="CALSTABLE"
-><COL><COL><THEAD
+><THEAD
 ><TR
 ><TH
 >Key (type)</TH
@@ -8926,12 +9225,15 @@ CLASS="informaltable"
 ><P
 ></P
 ><A
-NAME="AEN2924"
+NAME="AEN2980"
 ></A
 ><TABLE
 BORDER="1"
+BGCOLOR="#E0E0E0"
+CELLSPACING="0"
+CELLPADDING="4"
 CLASS="CALSTABLE"
-><COL><COL><THEAD
+><THEAD
 ><TR
 ><TH
 >Method (parameter types)</TH
@@ -8986,7 +9288,7 @@ CLASS="sect2"
 CLASS="sect2"
 ><A
 NAME="device-properties-ac_adaptor"
->2.3.18. <TT
+><TT
 CLASS="literal"
 >ac_adaptor</TT
 > namespace</A
@@ -9003,12 +9305,15 @@ CLASS="informaltable"
 ><P
 ></P
 ><A
-NAME="AEN2950"
+NAME="AEN3006"
 ></A
 ><TABLE
 BORDER="1"
+BGCOLOR="#E0E0E0"
+CELLSPACING="0"
+CELLPADDING="4"
 CLASS="CALSTABLE"
-><COL><COL><THEAD
+><THEAD
 ><TR
 ><TH
 >Key (type)</TH
@@ -9049,7 +9354,7 @@ CLASS="sect2"
 CLASS="sect2"
 ><A
 NAME="device-properties-battery"
->2.3.19. <TT
+><TT
 CLASS="literal"
 >battery</TT
 > namespace</A
@@ -9067,12 +9372,15 @@ CLASS="informaltable"
 ><P
 ></P
 ><A
-NAME="AEN2970"
+NAME="AEN3026"
 ></A
 ><TABLE
 BORDER="1"
+BGCOLOR="#E0E0E0"
+CELLSPACING="0"
+CELLPADDING="4"
 CLASS="CALSTABLE"
-><COL><COL><THEAD
+><THEAD
 ><TR
 ><TH
 >Key (type)</TH
@@ -9965,7 +10273,7 @@ CLASS="sect2"
 CLASS="sect2"
 ><A
 NAME="device-properties-button"
->2.3.20. <TT
+><TT
 CLASS="literal"
 >button</TT
 > namespace</A
@@ -9982,12 +10290,15 @@ CLASS="informaltable"
 ><P
 ></P
 ><A
-NAME="AEN3288"
+NAME="AEN3344"
 ></A
 ><TABLE
 BORDER="1"
+BGCOLOR="#E0E0E0"
+CELLSPACING="0"
+CELLPADDING="4"
 CLASS="CALSTABLE"
-><COL><COL><THEAD
+><THEAD
 ><TR
 ><TH
 >Key (type)</TH
@@ -10094,12 +10405,15 @@ CLASS="informaltable"
 ><P
 ></P
 ><A
-NAME="AEN3332"
+NAME="AEN3388"
 ></A
 ><TABLE
 BORDER="1"
+BGCOLOR="#E0E0E0"
+CELLSPACING="0"
+CELLPADDING="4"
 CLASS="CALSTABLE"
-><COL><COL><THEAD
+><THEAD
 ><TR
 ><TH
 >Condition Name</TH
@@ -10142,7 +10456,7 @@ CLASS="sect2"
 CLASS="sect2"
 ><A
 NAME="device-properties-processor"
->2.3.21. <TT
+><TT
 CLASS="literal"
 >processor</TT
 > namespace</A
@@ -10159,12 +10473,15 @@ CLASS="informaltable"
 ><P
 ></P
 ><A
-NAME="AEN3353"
+NAME="AEN3409"
 ></A
 ><TABLE
 BORDER="1"
+BGCOLOR="#E0E0E0"
+CELLSPACING="0"
+CELLPADDING="4"
 CLASS="CALSTABLE"
-><COL><COL><THEAD
+><THEAD
 ><TR
 ><TH
 >Key (type)</TH
@@ -10234,7 +10551,7 @@ CLASS="sect2"
 CLASS="sect2"
 ><A
 NAME="device-properties-display_device"
->2.3.22. <TT
+><TT
 CLASS="literal"
 >display_device</TT
 > namespace</A
@@ -10251,12 +10568,15 @@ CLASS="informaltable"
 ><P
 ></P
 ><A
-NAME="AEN3385"
+NAME="AEN3441"
 ></A
 ><TABLE
 BORDER="1"
+BGCOLOR="#E0E0E0"
+CELLSPACING="0"
+CELLPADDING="4"
 CLASS="CALSTABLE"
-><COL><COL><THEAD
+><THEAD
 ><TR
 ><TH
 >Key (type)</TH
@@ -10343,7 +10663,7 @@ CLASS="sect2"
 CLASS="sect2"
 ><A
 NAME="device-properties-sensor"
->2.3.23. <TT
+><TT
 CLASS="literal"
 >sensor</TT
 > namespace</A
@@ -10360,12 +10680,15 @@ CLASS="informaltable"
 ><P
 ></P
 ><A
-NAME="AEN3427"
+NAME="AEN3483"
 ></A
 ><TABLE
 BORDER="1"
+BGCOLOR="#E0E0E0"
+CELLSPACING="0"
+CELLPADDING="4"
 CLASS="CALSTABLE"
-><COL><COL><THEAD
+><THEAD
 ><TR
 ><TH
 >Key (type)</TH
@@ -10478,7 +10801,7 @@ CLASS="sect2"
 CLASS="sect2"
 ><A
 NAME="device-properties-power-management"
->2.3.24. <TT
+><TT
 CLASS="literal"
 >power_management</TT
 > namespace</A
@@ -10496,12 +10819,15 @@ CLASS="informaltable"
 ><P
 ></P
 ><A
-NAME="AEN3483"
+NAME="AEN3539"
 ></A
 ><TABLE
 BORDER="1"
+BGCOLOR="#E0E0E0"
+CELLSPACING="0"
+CELLPADDING="4"
 CLASS="CALSTABLE"
-><COL><COL><THEAD
+><THEAD
 ><TR
 ><TH
 >Key (type)</TH
@@ -10631,12 +10957,15 @@ CLASS="informaltable"
 ><P
 ></P
 ><A
-NAME="AEN3527"
+NAME="AEN3583"
 ></A
 ><TABLE
 BORDER="1"
+BGCOLOR="#E0E0E0"
+CELLSPACING="0"
+CELLPADDING="4"
 CLASS="CALSTABLE"
-><COL><COL><THEAD
+><THEAD
 ><TR
 ><TH
 >Method (parameter types)</TH
@@ -10699,7 +11028,7 @@ CLASS="sect2"
 CLASS="sect2"
 ><A
 NAME="device-properties-tape"
->2.3.25. <TT
+><TT
 CLASS="literal"
 >tape</TT
 > namespace</A
@@ -10716,12 +11045,15 @@ CLASS="informaltable"
 ><P
 ></P
 ><A
-NAME="AEN3553"
+NAME="AEN3609"
 ></A
 ><TABLE
 BORDER="1"
+BGCOLOR="#E0E0E0"
+CELLSPACING="0"
+CELLPADDING="4"
 CLASS="CALSTABLE"
-><COL><COL><THEAD
+><THEAD
 ><TR
 ><TH
 >Key (type)</TH
@@ -10775,7 +11107,7 @@ CLASS="sect1"
 CLASS="sect1"
 ><A
 NAME="properties-policy"
->2.4. Policy Properties</A
+>Policy Properties</A
 ></H2
 ><P
 >&#13;      The properties on a hal device object can be used to express
@@ -10791,7 +11123,7 @@ CLASS="sect2"
 CLASS="sect2"
 ><A
 NAME="device-properties-storage-policy-default"
->2.4.1. <TT
+><TT
 CLASS="literal"
 >storage.policy.default</TT
 > namespace</A
@@ -10806,12 +11138,15 @@ CLASS="informaltable"
 ><P
 ></P
 ><A
-NAME="AEN3581"
+NAME="AEN3637"
 ></A
 ><TABLE
 BORDER="1"
+BGCOLOR="#E0E0E0"
+CELLSPACING="0"
+CELLPADDING="4"
 CLASS="CALSTABLE"
-><COL><COL><THEAD
+><THEAD
 ><TR
 ><TH
 >Key (type)</TH
@@ -10836,14 +11171,11 @@ CLASS="literal"
 ><TD
 >No</TD
 ><TD
->&#13;                Whether to use a <SPAN
-CLASS="emphasis"
-><I
+>&#13;                Whether to use a <I
 CLASS="emphasis"
 >managed no
                   operation
                 </I
-></SPAN
 >
                 keyword when adding entries to
                 the File Systems file (<TT
@@ -10959,7 +11291,7 @@ CLASS="sect2"
 CLASS="sect2"
 ><A
 NAME="device-properties-storage-policy"
->2.4.2. <TT
+><TT
 CLASS="literal"
 >storage.policy</TT
 > namespace</A
@@ -10974,12 +11306,15 @@ CLASS="informaltable"
 ><P
 ></P
 ><A
-NAME="AEN3633"
+NAME="AEN3689"
 ></A
 ><TABLE
 BORDER="1"
+BGCOLOR="#E0E0E0"
+CELLSPACING="0"
+CELLPADDING="4"
 CLASS="CALSTABLE"
-><COL><COL><THEAD
+><THEAD
 ><TR
 ><TH
 >Key (type)</TH
@@ -11091,7 +11426,7 @@ CLASS="sect2"
 CLASS="sect2"
 ><A
 NAME="device-properties-volume-policy"
->2.4.3. <TT
+><TT
 CLASS="literal"
 >volume.policy</TT
 > namespace</A
@@ -11106,12 +11441,15 @@ CLASS="informaltable"
 ><P
 ></P
 ><A
-NAME="AEN3674"
+NAME="AEN3730"
 ></A
 ><TABLE
 BORDER="1"
+BGCOLOR="#E0E0E0"
+CELLSPACING="0"
+CELLPADDING="4"
 CLASS="CALSTABLE"
-><COL><COL><THEAD
+><THEAD
 ><TR
 ><TH
 >Key (type)</TH
@@ -11205,7 +11543,7 @@ CLASS="chapter"
 ><A
 NAME="spec-device-info"
 ></A
->Chapter 3. Device Information Files</H1
+>Device Information Files</H1
 ><P
 >&#13;    Device information files (<TT
 CLASS="literal"
@@ -11731,7 +12069,7 @@ CLASS="sect1"
 CLASS="sect1"
 ><A
 NAME="fdi-facts"
->3.1. Facts about devices</A
+>Facts about devices</A
 ></H2
 ><DIV
 CLASS="sect2"
@@ -11739,8 +12077,14 @@ CLASS="sect2"
 CLASS="sect2"
 ><A
 NAME="fdi-example-mp3player"
->3.1.1. Example: MP3 player</A
+>Example: MP3 player</A
 ></H3
+><TABLE
+BORDER="0"
+BGCOLOR="#E0E0E0"
+WIDTH="100%"
+><TR
+><TD
 ><PRE
 CLASS="programlisting"
 >&#13;        &#60;?xml version="1.0" encoding="ISO-8859-1"?&#62; &#60;!-- -*- SGML -*- --&#62; 
@@ -11764,6 +12108,9 @@ CLASS="programlisting"
   &#60;/device&#62;
 &#60;/deviceinfo&#62;
       </PRE
+></TD
+></TR
+></TABLE
 ><P
 >&#13;        The final set of properties look like this:
       </P
@@ -11778,8 +12125,14 @@ CLASS="sect2"
 CLASS="sect2"
 ><A
 NAME="fdi-example-camera"
->3.1.2. Example: Digital Still Camera</A
+>Example: Digital Still Camera</A
 ></H3
+><TABLE
+BORDER="0"
+BGCOLOR="#E0E0E0"
+WIDTH="100%"
+><TR
+><TD
 ><PRE
 CLASS="programlisting"
 >&#13;        &#60;?xml version="1.0" encoding="ISO-8859-1"?&#62; &#60;!-- -*- SGML -*- --&#62; 
@@ -11801,6 +12154,9 @@ CLASS="programlisting"
   &#60;/device&#62;
 &#60;/deviceinfo&#62;
       </PRE
+></TD
+></TR
+></TABLE
 ><P
 >&#13;        The final set of properties look like this:
       </P
@@ -11815,8 +12171,14 @@ CLASS="sect2"
 CLASS="sect2"
 ><A
 NAME="fdi-example-6in1"
->3.1.3. Example: Card Reader</A
+>Example: Card Reader</A
 ></H3
+><TABLE
+BORDER="0"
+BGCOLOR="#E0E0E0"
+WIDTH="100%"
+><TR
+><TD
 ><PRE
 CLASS="programlisting"
 >&#13;        &#60;?xml version="1.0" encoding="ISO-8859-1"?&#62; &#60;!-- -*- SGML -*- --&#62; 
@@ -11847,6 +12209,9 @@ CLASS="programlisting"
   &#60;/device&#62;
 &#60;/deviceinfo&#62;
       </PRE
+></TD
+></TR
+></TABLE
 ><P
 >&#13;        As described in the documentation for the
         <TT
@@ -11855,7 +12220,14 @@ CLASS="literal"
 > property in
         <A
 HREF="#device-properties-storage"
->Section 2.3.4</A
+>the Section called <I
+><TT
+CLASS="literal"
+>storage</TT
+> namespace</I
+> in the Chapter called <I
+>Device Properties</I
+></A
 > this device information
         file export information about each storage port through the
         property <TT
@@ -11881,7 +12253,7 @@ CLASS="sect1"
 CLASS="sect1"
 ><A
 NAME="fdi-policy"
->3.2. Policy settings for devices</A
+>Policy settings for devices</A
 ></H2
 ><P
 >&#13;      Policy settings specifies system specific settings that a
@@ -11896,7 +12268,7 @@ CLASS="sect2"
 CLASS="sect2"
 ><A
 NAME="fdi-example-mountsetting"
->3.2.1. Storage Devices</A
+>Storage Devices</A
 ></H3
 ><P
 >&#13;        Policy for storage devices is expressed in the
@@ -11914,10 +12286,20 @@ CLASS="literal"
 > namespaces, see
         <A
 HREF="#properties-policy"
->Section 2.4</A
+>the Section called <I
+>Policy Properties</I
+> in the Chapter called <I
+>Device Properties</I
+></A
 >
          for details.
       </P
+><TABLE
+BORDER="0"
+BGCOLOR="#E0E0E0"
+WIDTH="100%"
+><TR
+><TD
 ><PRE
 CLASS="programlisting"
 >&#13;        &#60;?xml version="1.0" encoding="ISO-8859-1"?&#62; &#60;!-- -*- SGML -*- --&#62; 
@@ -11962,6 +12344,9 @@ CLASS="programlisting"
 
 &#60;/deviceinfo&#62;
       </PRE
+></TD
+></TR
+></TABLE
 ></DIV
 ></DIV
 ></DIV
@@ -11971,14 +12356,14 @@ CLASS="chapter"
 ><A
 NAME="examples"
 ></A
->Chapter 4. Examples and other stuff</H1
+>Examples and other stuff</H1
 ><DIV
 CLASS="sect1"
 ><H2
 CLASS="sect1"
 ><A
 NAME="callouts"
->4.1. Callouts</A
+>Callouts</A
 ></H2
 ><P
 >&#13;      Callouts are programs invoked when the device object list is
@@ -12001,12 +12386,15 @@ CLASS="informaltable"
 ><P
 ></P
 ><A
-NAME="AEN3908"
+NAME="AEN3964"
 ></A
 ><TABLE
 BORDER="1"
+BGCOLOR="#E0E0E0"
+CELLSPACING="0"
+CELLPADDING="4"
 CLASS="CALSTABLE"
-><COL><COL><THEAD
+><THEAD
 ><TR
 ><TH
 >Key (type)</TH
@@ -12127,7 +12515,7 @@ CLASS="sect1"
 CLASS="sect1"
 ><A
 NAME="dbus-api"
->4.2. D-BUS Network API</A
+>D-BUS Network API</A
 ></H2
 ><P
 >&#13;      The HAL daemon is a system-wide process that keeps track of a
@@ -12140,7 +12528,11 @@ NAME="dbus-api"
       a camera device, is outside the scope of the HAL daemon; see
       <A
 HREF="#using-devices"
->Section 1.7</A
+>the Section called <I
+>Using devices</I
+> in the Chapter called <I
+>Introduction</I
+></A
 >
        for more information.
     </P
@@ -12157,8 +12549,8 @@ CLASS="sect2"
 ><HR><H3
 CLASS="sect2"
 ><A
-NAME="AEN3950"
->4.2.1. Interface org.freedesktop.Hal.Manager</A
+NAME="AEN4006"
+>Interface org.freedesktop.Hal.Manager</A
 ></H3
 ><P
 >&#13;        Using D-BUS terminology, the HAL daemon provides the D-BUS
@@ -12178,6 +12570,12 @@ CLASS="literal"
 >, for
         querying device objects with the following methods:
       </P
+><TABLE
+BORDER="0"
+BGCOLOR="#E0E0E0"
+WIDTH="100%"
+><TR
+><TD
 ><PRE
 CLASS="programlisting"
 >&#13;# Return a list of all devices in the GDL
@@ -12206,6 +12604,9 @@ array{string} FindDeviceStringMatch(stri
 #
 array{string} FindDeviceByCapability(string capability)
       </PRE
+></TD
+></TR
+></TABLE
 ><P
 >&#13;        This object also emits the following signals on the
         <TT
@@ -12218,6 +12619,12 @@ CLASS="literal"
 > interface that
         applications can subscribe to using D-BUS:
       </P
+><TABLE
+BORDER="0"
+BGCOLOR="#E0E0E0"
+WIDTH="100%"
+><TR
+><TD
 ><PRE
 CLASS="programlisting"
 >&#13;# Notification that a new device have been added to the GDL
@@ -12238,17 +12645,26 @@ void DeviceRemoved(string udi)
 #
 void NewCapability(string udi, string capability)
       </PRE
+></TD
+></TR
+></TABLE
 ><DIV
 CLASS="sect3"
 ><HR><H4
 CLASS="sect3"
 ><A
-NAME="AEN3961"
->4.2.1.1. Example</A
+NAME="AEN4017"
+>Example</A
 ></H4
 ><P
 >&#13;          The following brief Python program demonstrates some of the API
         </P
+><TABLE
+BORDER="0"
+BGCOLOR="#E0E0E0"
+WIDTH="100%"
+><TR
+><TD
 ><PRE
 CLASS="programlisting"
 >&#13;          #!/usr/bin/python
@@ -12286,9 +12702,18 @@ bus.add_signal_receiver (device_removed,
 			 '/org/freedesktop/Hal/Manager')
 gtk.main()
         </PRE
+></TD
+></TR
+></TABLE
 ><P
 >&#13;          which gives the following output
         </P
+><TABLE
+BORDER="0"
+BGCOLOR="#E0E0E0"
+WIDTH="100%"
+><TR
+><TD
 ><PRE
 CLASS="programlisting"
 >&#13;Found device /org/freedesktop/Hal/devices/block_TORiSAN DVD-ROM DRD-U624-00000000000000000001-disc
@@ -12325,6 +12750,9 @@ Device /org/freedesktop/Hal/devices/usbi
 Device /org/freedesktop/Hal/devices/usb_46d_c001_410_-1_noserial was removed
 Device /org/freedesktop/Hal/devices/usbif_usb_46d_c001_410_-1_noserial_0 was removed
         </PRE
+></TD
+></TR
+></TABLE
 ><P
 >&#13;        </P
 ></DIV
@@ -12334,8 +12762,8 @@ CLASS="sect2"
 ><HR><H3
 CLASS="sect2"
 ><A
-NAME="AEN3969"
->4.2.2. Interface org.freedesktop.Hal.Device</A
+NAME="AEN4025"
+>Interface org.freedesktop.Hal.Device</A
 ></H3
 ><P
 >&#13;        Applications use
@@ -12353,6 +12781,12 @@ CLASS="literal"
         object denoted by the UDI. This interface has the following
         methods
       </P
+><TABLE
+BORDER="0"
+BGCOLOR="#E0E0E0"
+WIDTH="100%"
+><TR
+><TD
 ><PRE
 CLASS="programlisting"
 >&#13;# Set property
@@ -12434,11 +12868,20 @@ void Lock(string reason)
 #
 void Unlock()
       </PRE
+></TD
+></TR
+></TABLE
 ><P
 >&#13;        The device objects also emits the following signals on the
         org.freedesktop.Hal interface that applications can subscribe to
         using D-BUS
       </P
+><TABLE
+BORDER="0"
+BGCOLOR="#E0E0E0"
+WIDTH="100%"
+><TR
+><TD
 ><PRE
 CLASS="programlisting"
 >&#13;# Notification that property have been modified
@@ -12457,6 +12900,9 @@ void PropertyModified(string key, bool a
 # @param  ...                   Dependent on the condition name
 void Condition(string condition, ...)
       </PRE
+></TD
+></TR
+></TABLE
 ><P
 >&#13;        Note that D-BUS supports that applications can opt to receive
         signals for only a subset of the devices available.
@@ -12469,7 +12915,7 @@ CLASS="sect1"
 CLASS="sect1"
 ><A
 NAME="enforcing-policy"
->4.3. Enforcing Policy</A
+>Enforcing Policy</A
 ></H2
 ><P
 >&#13;      Notwithstanding the fact that HAL avoids to enforce any policy,
@@ -12484,7 +12930,7 @@ CLASS="sect2"
 CLASS="sect2"
 ><A
 NAME="enforcing-stor-vol"
->4.3.1. Storage Devices</A
+>Storage Devices</A
 ></H3
 ><DIV
 CLASS="sect3"
@@ -12492,7 +12938,7 @@ CLASS="sect3"
 CLASS="sect3"
 ><A
 NAME="stor-vol-policy"
->4.3.1.1. Policy for Volumes and Storage devices</A
+>Policy for Volumes and Storage devices</A
 ></H4
 ><P
 >&#13;          The properties in the <TT
@@ -12510,7 +12956,11 @@ CLASS="literal"
           be the preferred way to determine how and if a filesystem
           can be mounted. See <A
 HREF="#properties-policy"
->Section 2.4</A
+>the Section called <I
+>Policy Properties</I
+> in the Chapter called <I
+>Device Properties</I
+></A
 >
           for details.
         </P
@@ -12521,7 +12971,7 @@ CLASS="sect3"
 CLASS="sect3"
 ><A
 NAME="enforcing-storage-fstab"
->4.3.1.2. File systems file</A
+>File systems file</A
 ></H4
 ><P
 >&#13;          An operating system vendor should maintain the
@@ -12540,7 +12990,9 @@ CLASS="literal"
           a corresponding entry if applicable cf.
           <A
 HREF="#stor-vol-policy"
->Section 4.3.1.1</A
+>the Section called <I
+>Policy for Volumes and Storage devices</I
+></A
 >
           .
         </P
@@ -12572,7 +13024,7 @@ CLASS="sect3"
 CLASS="sect3"
 ><A
 NAME="enforcing-storage-locking"
->4.3.1.3. Disabling policy agents</A
+>Disabling policy agents</A
 ></H4
 ><P
 >&#13;          Policy agents like volume mounters should ignore when media
diff --git a/hald/linux2/blockdev.c b/hald/linux2/blockdev.c
index 8eea252..5c06e9e 100644
--- a/hald/linux2/blockdev.c
+++ b/hald/linux2/blockdev.c
@@ -755,6 +755,9 @@ hotplug_event_begin_add_blockdev (const 
 	gboolean is_fakevolume;
 	char *sysfs_path_real = NULL;
 	int floppy_num;
+	gboolean is_device_mapper;
+
+	is_device_mapper = FALSE;
 
 	HAL_INFO (("block_add: sysfs_path=%s dev=%s is_part=%d, parent=0x%08x", 
 		   sysfs_path, device_file, is_partition, parent));
@@ -830,6 +833,7 @@ hotplug_event_begin_add_blockdev (const 
 							if (parent != NULL) {
 								HAL_INFO ((" parent='%s'!", parent->udi));
 								hal_device_property_set_string (d, "volume.crypto_luks.clear.backing_volume", slave_volume->udi);
+								is_device_mapper = TRUE;
 							}
 						}
 					}
@@ -888,6 +892,7 @@ hotplug_event_begin_add_blockdev (const 
 		hal_device_property_set_bool (d, "storage.removable", TRUE);
 		hal_device_property_set_bool (d, "storage.hotpluggable", FALSE);
 		hal_device_property_set_bool (d, "storage.requires_eject", FALSE);
+		hal_device_property_set_uint64 (d, "storage.size", 0);
 
 		hal_device_property_set_string (d, "info.category", "storage");
 		hal_device_add_capability (d, "storage");
@@ -1028,6 +1033,17 @@ hotplug_event_begin_add_blockdev (const 
 		}
 
 		hal_device_property_set_bool (d, "storage.removable", is_removable);
+		/* set storage.size only if we have fixed media */
+		if (!is_removable) {
+			guint64 num_blocks;
+			if (hal_util_get_uint64_from_file (sysfs_path, "size", &num_blocks, 0)) {
+				/* TODO: sane to assume this is always 512 for non-removable? 
+				 * I think genhd.c guarantees this... */
+				hal_device_property_set_uint64 (d, "storage.size", num_blocks * 512);
+			}
+		} else {
+			hal_device_property_set_uint64 (d, "storage.size", 0);
+		}
 
 		/* by default, do checks for media if, and only if, the removable file is set to 1
 		 *
@@ -1138,6 +1154,7 @@ hotplug_event_begin_add_blockdev (const 
 
 	} else {
 		guint sysfs_path_len;
+		gboolean is_physical_partition;
 
 		/*************************
 		 *
@@ -1159,7 +1176,13 @@ hotplug_event_begin_add_blockdev (const 
 		hal_device_property_set_bool (
 			d, "volume.is_disc", 
 			strcmp (hal_device_property_get_string (parent, "storage.drive_type"), "cdrom") == 0);
-		hal_device_property_set_bool (d, "volume.is_partition", TRUE);
+
+
+		is_physical_partition = TRUE;
+		if (is_fakevolume || is_device_mapper)
+			is_physical_partition = FALSE;
+
+		hal_device_property_set_bool (d, "volume.is_partition", is_physical_partition);
 
 		hal_device_property_set_string (d, "info.category", "volume");
 		if (strcmp(hal_device_property_get_string (parent, "storage.drive_type"), "cdrom") == 0) {
@@ -1168,9 +1191,9 @@ hotplug_event_begin_add_blockdev (const 
 		hal_device_add_capability (d, "volume");
 		hal_device_add_capability (d, "block");
 
-		/* determine partition number - unless, of course, we're a fakevolume */
+		/* determine partition number */
 		sysfs_path_len = strlen (sysfs_path);
-		if (!is_fakevolume) {
+		if (is_physical_partition) {
 			if (sysfs_path_len > 0 && isdigit (sysfs_path[sysfs_path_len - 1])) {
 				guint i;
 				for (i = sysfs_path_len - 1; isdigit (sysfs_path[i]); --i)
@@ -1200,7 +1223,19 @@ hotplug_event_begin_add_blockdev (const 
 		}
 		hal_device_property_set_uint64 (
 			d, "volume.size",
-			((dbus_uint64_t)(512)) * ((dbus_uint64_t)(hal_device_property_set_int (d, "volume.block_size", 512))));
+			((dbus_uint64_t)(512)) * ((dbus_uint64_t)(hal_device_property_get_int (d, "volume.num_blocks"))));
+		/* TODO: move to prober? */
+		if (is_partition) {
+			guint64 start_block;
+			guint64 parent_size;
+			if (hal_util_get_uint64_from_file (sysfs_path, "start", &start_block, 0)) {
+				hal_device_property_set_uint64 (d, "volume.partition.start", start_block * 512);
+			}
+			if (hal_util_get_uint64_from_file (sysfs_path, "../size", &parent_size, 0)) {
+				hal_device_property_set_uint64 (d, "volume.partition.media_size", parent_size * 512);
+			}
+		}
+
 
 		/* add to TDL so preprobing callouts and prober can access it */
 		hal_device_store_add (hald_get_tdl (), d);
diff --git a/hald/util.c b/hald/util.c
index a73e8e8..786b269 100644
--- a/hald/util.c
+++ b/hald/util.c
@@ -355,6 +355,57 @@ hal_util_set_int_from_file (HalDevice *d
 	return ret;
 }
 
+
+gboolean
+hal_util_get_uint64_from_file (const gchar *directory, const gchar *file, guint64 *result, gint base)
+{
+	FILE *f;
+	char buf[64];
+	gchar path[HAL_PATH_MAX];
+	gboolean ret;
+
+	f = NULL;
+	ret = FALSE;
+
+	g_snprintf (path, sizeof (path), "%s/%s", directory, file);
+
+	f = fopen (path, "rb");
+	if (f == NULL) {
+		HAL_ERROR (("Cannot open '%s'", path));
+		goto out;
+	}
+
+	if (fgets (buf, sizeof (buf), f) == NULL) {
+		HAL_ERROR (("Cannot read from '%s'", path));
+		goto out;
+	}
+
+	/* TODO: handle error condition */
+	*result = strtoll (buf, NULL, base);
+
+	ret = TRUE;
+
+out:
+	if (f != NULL)
+		fclose (f);
+
+	return ret;
+}
+
+gboolean
+hal_util_set_uint64_from_file (HalDevice *d, const gchar *key, const gchar *directory, const gchar *file, gint base)
+{
+	guint64 value;
+	gboolean ret;
+
+	ret = FALSE;
+
+	if (hal_util_get_uint64_from_file (directory, file, &value, base))
+		ret = hal_device_property_set_uint64 (d, key, value);
+
+	return ret;
+}
+
 gboolean
 hal_util_get_bcd2_from_file (const gchar *directory, const gchar *file, gint *result)
 {
diff --git a/hald/util.h b/hald/util.h
index 2dcfcf9..98ca5fa 100644
--- a/hald/util.h
+++ b/hald/util.h
@@ -58,6 +58,10 @@ gboolean hal_util_get_int_from_file (con
 
 gboolean hal_util_set_int_from_file (HalDevice *d, const gchar *key, const gchar *directory, const gchar *file, gint base);
 
+gboolean hal_util_get_uint64_from_file (const gchar *directory, const gchar *file, guint64 *result, gint base);
+
+gboolean hal_util_set_uint64_from_file (HalDevice *d, const gchar *key, const gchar *directory, const gchar *file, gint base);
+
 gchar *hal_util_get_string_from_file (const gchar *directory, const gchar *file);
 
 gboolean hal_util_set_string_from_file (HalDevice *d, const gchar *key, const gchar *directory, const gchar *file);
diff --git a/libhal-storage/libhal-storage.c b/libhal-storage/libhal-storage.c
index 6ce649d..845e006 100644
--- a/libhal-storage/libhal-storage.c
+++ b/libhal-storage/libhal-storage.c
@@ -708,6 +708,8 @@ struct LibHalDrive_s {
 
 	dbus_bool_t no_partitions_hint;
 
+	dbus_uint64_t drive_size;
+
 	LibHalContext *hal_ctx;
 
 	char **capabilities;
@@ -760,6 +762,9 @@ struct LibHalVolume_s {
 
 	dbus_uint64_t volume_size;
 	dbus_uint64_t disc_capacity;
+
+	dbus_uint64_t partition_start_offset;
+	dbus_uint64_t partition_media_size;
 };
 
 const char *
@@ -921,7 +926,7 @@ libhal_drive_from_udi (LibHalContext *ha
 		LIBHAL_PROP_EXTRACT_STRING ("storage.vendor",            drive->vendor);
 		LIBHAL_PROP_EXTRACT_STRING ("storage.model",             drive->model);
 		LIBHAL_PROP_EXTRACT_STRING ("storage.drive_type",        drive->type_textual);
-
+		LIBHAL_PROP_EXTRACT_UINT64 ("storage.size", 		 drive->drive_size); 
 
 		LIBHAL_PROP_EXTRACT_STRING ("storage.icon.drive",        drive->dedicated_icon_drive);
 		LIBHAL_PROP_EXTRACT_STRING ("storage.icon.volume",       drive->dedicated_icon_volume);
@@ -1101,6 +1106,10 @@ libhal_volume_from_udi (LibHalContext *h
 
 		LIBHAL_PROP_EXTRACT_BEGIN;
 
+		LIBHAL_PROP_EXTRACT_BOOL   ("volume.is_partition",                    vol->is_partition);
+		LIBHAL_PROP_EXTRACT_INT    ("volume.partition.number",                vol->partition_number);
+		LIBHAL_PROP_EXTRACT_UINT64 ("volume.partition.start", 		      vol->partition_start_offset); 
+		LIBHAL_PROP_EXTRACT_UINT64 ("volume.partition.media_size",            vol->partition_media_size); 
 		LIBHAL_PROP_EXTRACT_INT    ("volume.partition.msdos_part_table_type", vol->msdos_part_table_type);
 
 		LIBHAL_PROP_EXTRACT_INT    ("block.minor",               vol->device_minor);
@@ -1360,6 +1369,12 @@ libhal_drive_uses_removable_media (LibHa
 	return drive->is_removable;
 }
 
+dbus_uint64_t
+libhal_drive_get_size (LibHalDrive *drive)
+{
+	return drive->drive_size;
+}
+
 LibHalDriveType
 libhal_drive_get_type (LibHalDrive *drive)
 {
@@ -1504,6 +1519,18 @@ libhal_volume_get_partition_number (LibH
 	return volume->partition_number;
 }
 
+dbus_uint64_t 
+libhal_volume_get_partition_start_offset (LibHalVolume *volume)
+{
+	return volume->partition_start_offset;
+}
+
+dbus_uint64_t
+libhal_volume_get_partition_media_size (LibHalVolume *volume)
+{
+	return volume->partition_media_size;
+}
+
 const char *
 libhal_volume_get_label (LibHalVolume *volume)
 {
diff --git a/libhal-storage/libhal-storage.h b/libhal-storage/libhal-storage.h
index 700955a..4228ff3 100644
--- a/libhal-storage/libhal-storage.h
+++ b/libhal-storage/libhal-storage.h
@@ -194,6 +194,7 @@ void                 libhal_drive_free  
 
 dbus_bool_t          libhal_drive_is_hotpluggable          (LibHalDrive      *drive);
 dbus_bool_t          libhal_drive_uses_removable_media     (LibHalDrive      *drive);
+dbus_uint64_t        libhal_drive_get_size                 (LibHalDrive      *drive);
 dbus_bool_t          libhal_drive_no_partitions_hint       (LibHalDrive      *drive);
 dbus_bool_t          libhal_drive_requires_eject           (LibHalDrive      *drive);
 LibHalDriveType      libhal_drive_get_type                 (LibHalDrive      *drive);
@@ -287,6 +288,8 @@ dbus_bool_t          libhal_volume_is_mo
 dbus_bool_t          libhal_volume_is_partition                  (LibHalVolume     *volume);
 dbus_bool_t          libhal_volume_is_disc                       (LibHalVolume     *volume);
 unsigned int         libhal_volume_get_partition_number          (LibHalVolume     *volume);
+dbus_uint64_t        libhal_volume_get_partition_start_offset    (LibHalVolume     *volume);
+dbus_uint64_t        libhal_volume_get_partition_media_size      (LibHalVolume     *volume);
 const char          *libhal_volume_get_label                     (LibHalVolume     *volume);
 const char          *libhal_volume_get_mount_point               (LibHalVolume     *volume);
 const char          *libhal_volume_get_uuid                      (LibHalVolume     *volume);



More information about the hal-commit mailing list