diff options
Diffstat (limited to 'sysutils/hal/files/patch-hald_hf-storage.c')
-rw-r--r-- | sysutils/hal/files/patch-hald_hf-storage.c | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/sysutils/hal/files/patch-hald_hf-storage.c b/sysutils/hal/files/patch-hald_hf-storage.c index 17570163d..65440e796 100644 --- a/sysutils/hal/files/patch-hald_hf-storage.c +++ b/sysutils/hal/files/patch-hald_hf-storage.c @@ -1,5 +1,5 @@ --- hald/freebsd/hf-storage.c.orig 2009-05-12 08:24:28.000000000 -0400 -+++ hald/freebsd/hf-storage.c 2009-09-22 01:53:29.000000000 -0400 ++++ hald/freebsd/hf-storage.c 2009-09-26 03:51:08.000000000 -0400 @@ -30,6 +30,8 @@ #include <limits.h> #include <inttypes.h> @@ -114,7 +114,7 @@ else geom_obj->type = atoi(fields[10]); } -@@ -541,15 +579,20 @@ hf_storage_device_rescan_real (HalDevice +@@ -541,17 +579,27 @@ hf_storage_device_rescan_real (HalDevice } static gboolean @@ -135,10 +135,17 @@ + if (! data || strcmp(system, "DEVFS") || strcmp(subsystem, "CDEV") || + (strcmp(type, "CREATE") && strcmp(type, "DESTROY"))) + return FALSE; ++ ++ if (! strcmp(type, "DESTROY")) ++ g_usleep(G_USEC_PER_SEC/2); conftxt = hf_get_string_sysctl(NULL, "kern.geom.conftxt"); ++ if (! conftxt) ++ return FALSE; new_disks = hf_storage_parse_conftxt(conftxt); -@@ -572,6 +615,7 @@ hf_storage_conftxt_timeout_cb (gpointer + g_free(conftxt); + +@@ -572,6 +620,7 @@ hf_storage_conftxt_timeout_cb (gpointer if (! hf_storage_find_disk(disks, disk->name)) { osspec_probe(); /* catch new disk(s) */ @@ -146,7 +153,7 @@ break; } } -@@ -593,7 +637,10 @@ hf_storage_conftxt_timeout_cb (gpointer +@@ -593,7 +642,10 @@ hf_storage_conftxt_timeout_cb (gpointer device = hf_devtree_find_from_name(hald_get_gdl(), disk->name); if (device && hal_device_has_capability(device, "storage") && ! hf_storage_device_has_addon(device)) @@ -158,7 +165,7 @@ } } else -@@ -601,7 +648,10 @@ hf_storage_conftxt_timeout_cb (gpointer +@@ -601,7 +653,10 @@ hf_storage_conftxt_timeout_cb (gpointer /* disk removed */ device = hf_devtree_find_from_name(hald_get_gdl(), disk->name); if (device && hal_device_has_capability(device, "storage")) @@ -170,7 +177,7 @@ } } } -@@ -610,17 +660,30 @@ hf_storage_conftxt_timeout_cb (gpointer +@@ -610,17 +665,30 @@ hf_storage_conftxt_timeout_cb (gpointer g_slist_free(disks); disks = new_disks; @@ -203,7 +210,7 @@ return; conftxt = hf_get_string_sysctl(NULL, "kern.geom.conftxt"); -@@ -636,8 +699,10 @@ hf_storage_init_geom (void) +@@ -636,8 +704,10 @@ hf_storage_init_geom (void) static void hf_storage_init (void) { @@ -215,7 +222,7 @@ } void -@@ -719,8 +784,6 @@ hf_storage_device_add (HalDevice *device +@@ -719,8 +789,6 @@ hf_storage_device_add (HalDevice *device { g_return_if_fail(HAL_IS_DEVICE(device)); @@ -224,7 +231,7 @@ if (hf_device_preprobe(device)) { hf_storage_device_probe(device, FALSE); -@@ -738,7 +801,7 @@ hf_storage_get_geoms (const char *devnam +@@ -738,7 +806,7 @@ hf_storage_get_geoms (const char *devnam g_return_val_if_fail(devname != NULL, NULL); @@ -233,7 +240,7 @@ hash = g_str_hash(devname); node = g_node_find(hf_storage_geom_tree, G_PRE_ORDER, G_TRAVERSE_ALL, -@@ -801,3 +864,7 @@ HFHandler hf_storage_handler = { +@@ -801,3 +869,7 @@ HFHandler hf_storage_handler = { .probe = hf_storage_probe, .device_rescan = hf_storage_device_rescan }; |