[PATCH] set the storage.removable.support_async_notification property
Joe Marcus Clarke
marcus at FreeBSD.org
Mon Jan 7 11:01:29 PST 2008
Set the storage.removable.support_async_notification to FALSE universally
so that hald-addon-storage will run to detect media changes.
---
hald/freebsd/hf-scsi.c | 1 +
hald/freebsd/hf-storage.c | 3 +++
2 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/hald/freebsd/hf-scsi.c b/hald/freebsd/hf-scsi.c
index f6d0c45..f4fd1ea 100644
--- a/hald/freebsd/hf-scsi.c
+++ b/hald/freebsd/hf-scsi.c
@@ -188,6 +188,7 @@ hf_scsi_block_device_new (HalDevice *parent,
{
hal_device_property_set_bool(device, "storage.removable", TRUE);
hal_device_property_set_bool(device, "storage.media_check_enabled", TRUE);
+ hal_device_property_set_bool(device, "storage.removable.support_async_notification", FALSE);
}
cam_strvis(revision, match->inq_data.revision, sizeof(match->inq_data.revision), sizeof(revision));
diff --git a/hald/freebsd/hf-storage.c b/hald/freebsd/hf-storage.c
index 06b5f04..f4c4e71 100644
--- a/hald/freebsd/hf-storage.c
+++ b/hald/freebsd/hf-storage.c
@@ -655,6 +655,7 @@ hf_storage_device_enable (HalDevice *device)
hal_device_property_set_bool(device, "storage.media_check_enabled", FALSE);
hal_device_property_set_bool(device, "storage.automount_enabled_hint", TRUE);
hal_device_property_set_bool(device, "storage.no_partitions_hint", FALSE);
+ hal_device_property_set_bool(device, "storage.removable.support_async_notification", FALSE);
hal_device_property_set_string(device, "storage.originating_device", NULL);
hal_device_property_set_string(device, "storage.physical_device", NULL);
@@ -689,6 +690,8 @@ hf_storage_device_enable_cdrom (HalDevice *device)
hal_device_property_set_bool(device, "storage.no_partitions_hint", TRUE);
/* the linux backend sets this one */
hal_device_property_set_bool(device, "storage.requires_eject", TRUE);
+ /* allow the storage addon to watch for media changes */
+ hal_device_property_set_bool(device, "storage.removable.support_async_notification", FALSE);
/* some of these will be set by probe-storage */
hal_device_property_set_bool(device, "storage.cdrom.cdr", FALSE);
--
1.5.3.2
More information about the hal
mailing list