hal: Branch 'origin'
Rob Taylor
robtaylor at kemper.freedesktop.org
Tue Dec 19 10:45:56 PST 2006
hald/freebsd/hf-storage.c | 14 ++++----------
1 files changed, 4 insertions(+), 10 deletions(-)
New commits:
diff-tree c1bd8483392535d99df7de95f208a43f59c43cec (from 52a3bc52d6ce8f5fdc59320a458cfbc3d8e6da1b)
Author: Joe Marcus Clarke <marcus at FreeBSD.org>
Date: Mon Dec 18 23:48:10 2006 -0500
fix potnential crash when changing disc media
Turn two assertions into additional conditional checks to fix potential
crashes when changing disc media.
diff --git a/hald/freebsd/hf-storage.c b/hald/freebsd/hf-storage.c
index 57a1aef..24f58ad 100644
--- a/hald/freebsd/hf-storage.c
+++ b/hald/freebsd/hf-storage.c
@@ -587,22 +587,16 @@ hf_storage_conftxt_timeout_cb (gpointer
{
/* disk changed */
device = hf_devtree_find_from_name(hald_get_gdl(), disk->name);
- if (device)
- {
- g_assert(hal_device_has_capability(device, "storage"));
- hf_storage_device_rescan_real(device);
- }
+ if (device && hal_device_has_capability(device, "storage"))
+ hf_storage_device_rescan_real(device);
}
}
else
{
/* disk removed */
device = hf_devtree_find_from_name(hald_get_gdl(), disk->name);
- if (device)
- {
- g_assert(hal_device_has_capability(device, "storage"));
- hf_device_remove_tree(device);
- }
+ if (device && hal_device_has_capability(device, "storage"))
+ hf_device_remove_tree(device);
}
}
}
More information about the hal-commit
mailing list