~ubuntu-branches/ubuntu/lucid/hal/lucid

« back to all changes in this revision

Viewing changes to hald/linux/blockdev.c

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2009-06-26 10:04:33 UTC
  • mfrom: (1.2.9 upstream)
  • Revision ID: james.westby@ubuntu.com-20090626100433-nd42rcjbmg5261tx
Tags: 0.5.12+git20090626-0ubuntu1
* New upstream git snapshot:
  - Add input.keys capability to power/hibernate/etc. keys. (LP: #384890)
* Drop 01_tablet_evdev.patch, 50_no_crash_on_md_blockdev.patch: Applied
  upstream.
* 04_nvidia_brightness.patch: Update to new upstream version.
* debian/control: Change back Vcs-Bzr:, Ubuntu package are only for full
  source trees.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1498
1498
                hal_device_property_set_bool (d, "volume.is_mounted", FALSE);
1499
1499
                hal_device_property_set_bool (d, "volume.is_mounted_read_only", FALSE);
1500
1500
                hal_device_property_set_bool (d, "volume.linux.is_device_mapper", is_device_mapper);
1501
 
                hal_device_property_set_bool (d, "volume.is_disc", strcmp (hal_device_property_get_string (parent, "storage.drive_type"), "cdrom") == 0);
1502
 
 
 
1501
                /* Don't assume that the parent has storage capability, eg
 
1502
                 * if we are an MD partition then this is the case as we were
 
1503
                 * re-parented to the root computer device object earlier.
 
1504
                 */
 
1505
                if (hal_device_has_property(parent, "storage.drive_type")) {
 
1506
                        hal_device_property_set_bool (d, "volume.is_disc", strcmp (hal_device_property_get_string (parent, "storage.drive_type"), "cdrom") == 0);
 
1507
                } else {
 
1508
                        hal_device_property_set_bool (d, "volume.is_disc", FALSE);
 
1509
                }
1503
1510
 
1504
1511
                is_physical_partition = TRUE;
1505
1512
                if (is_fakevolume || is_device_mapper)
1508
1515
                hal_device_property_set_bool (d, "volume.is_partition", is_physical_partition);
1509
1516
 
1510
1517
                hal_device_property_set_string (d, "info.category", "volume");
1511
 
                if (strcmp(hal_device_property_get_string (parent, "storage.drive_type"), "cdrom") == 0) {
1512
 
                        hal_device_add_capability (d, "volume.disc");
 
1518
                if (hal_device_has_property(parent, "storage.drive_type")) {
 
1519
                        if (strcmp(hal_device_property_get_string (parent, "storage.drive_type"), "cdrom") == 0) {
 
1520
                                hal_device_add_capability (d, "volume.disc");
 
1521
                        }
1513
1522
                }
1514
1523
                hal_device_add_capability (d, "volume");
1515
1524
                hal_device_add_capability (d, "block");