diff options
author | 2007-04-16 15:36:36 +0000 | |
---|---|---|
committer | 2007-04-16 15:36:36 +0000 | |
commit | f3fefb04c3dd57e7beb60c4028c0264a207b6f8c (patch) | |
tree | 446080e670c56947571a879abe6b5ad49751a252 /sys-apps/hal | |
parent | see commit before, this time for real: (diff) | |
download | gentoo-2-f3fefb04c3dd57e7beb60c4028c0264a207b6f8c.tar.gz gentoo-2-f3fefb04c3dd57e7beb60c4028c0264a207b6f8c.tar.bz2 gentoo-2-f3fefb04c3dd57e7beb60c4028c0264a207b6f8c.zip |
storage addon re-probe fix for FreeBSD from Joe Marcus Clarke <marcus@freebsd.org>
(Portage version: 2.1.2.3)
Diffstat (limited to 'sys-apps/hal')
-rw-r--r-- | sys-apps/hal/ChangeLog | 7 | ||||
-rw-r--r-- | sys-apps/hal/files/0.5.9/10_freebsd_storage_reprobe_fix.patch | 61 | ||||
-rw-r--r-- | sys-apps/hal/files/0.5.9/series | 1 |
3 files changed, 68 insertions, 1 deletions
diff --git a/sys-apps/hal/ChangeLog b/sys-apps/hal/ChangeLog index 1a578154539e..3bfd4c2a07dc 100644 --- a/sys-apps/hal/ChangeLog +++ b/sys-apps/hal/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for sys-apps/hal # Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/hal/ChangeLog,v 1.165 2007/04/13 14:12:09 cardoe Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/hal/ChangeLog,v 1.166 2007/04/16 15:36:36 cardoe Exp $ + + 16 Apr 2007; Doug Goldstein <cardoe@gentoo.org> + +files/0.5.9/10_freebsd_storage_reprobe_fix.patch, files/0.5.9/series: + storage addon re-probe fix for FreeBSD from Joe Marcus Clarke + <marcus@freebsd.org> 13 Apr 2007; Doug Goldstein <cardoe@gentoo.org> hal-0.5.9.ebuild: We don't support pciutils pci.ids files gzipped diff --git a/sys-apps/hal/files/0.5.9/10_freebsd_storage_reprobe_fix.patch b/sys-apps/hal/files/0.5.9/10_freebsd_storage_reprobe_fix.patch new file mode 100644 index 000000000000..3199ed4a4322 --- /dev/null +++ b/sys-apps/hal/files/0.5.9/10_freebsd_storage_reprobe_fix.patch @@ -0,0 +1,61 @@ +From: Joe Marcus Clarke <marcus@FreeBSD.org> +Date: Sat, 14 Apr 2007 21:14:15 +0000 (-0400) +Subject: do not re-probe devices that are managed by hald-addon-storage +X-Git-Url: http://gitweb.freedesktop.org/?p=hal.git;a=commitdiff;h=15272b99f8d373b9bcd239112231f5bef099d24f + +do not re-probe devices that are managed by hald-addon-storage + +Do not re-probe devices that are managed by hald-addon-storage since that +will result in a double-probe and data corruption. In particular, this +fixes a problem with CD unmounting when ATAPICAM is enabled. +--- + +--- a/hald/freebsd/hf-storage.c ++++ b/hald/freebsd/hf-storage.c +@@ -65,6 +65,7 @@ static GNode *hf_storage_geom_tree = NUL + static GHashTable *hf_storage_geom_hash = NULL; + + static void hf_storage_init_geom (void); ++static gboolean hf_storage_device_has_addon (HalDevice *device); + + static void + hf_storage_geom_free (gpointer data) +@@ -587,7 +588,8 @@ hf_storage_conftxt_timeout_cb (gpointer + { + /* disk changed */ + device = hf_devtree_find_from_name(hald_get_gdl(), disk->name); +- if (device && hal_device_has_capability(device, "storage")) ++ if (device && hal_device_has_capability(device, "storage") && ++ ! hf_storage_device_has_addon(device)) + hf_storage_device_rescan_real(device); + } + } +@@ -768,6 +770,28 @@ hf_storage_device_rescan (HalDevice *dev + return FALSE; + } + ++static gboolean ++hf_storage_device_has_addon (HalDevice *device) ++{ ++ HalDeviceStrListIter iter; ++ ++ g_return_val_if_fail(device != NULL, FALSE); ++ ++ for (hal_device_property_strlist_iter_init(device, "info.addons", &iter); ++ hal_device_property_strlist_iter_is_valid(&iter); ++ hal_device_property_strlist_iter_next(&iter)) ++ { ++ const char *addon; ++ ++ addon = hal_device_property_strlist_iter_get_value(&iter); ++ ++ if (! strcmp(addon, "hald-addon-storage")) ++ return TRUE; ++ } ++ ++ return FALSE; ++} ++ + HFHandler hf_storage_handler = { + .init = hf_storage_init, + .probe = hf_storage_probe, diff --git a/sys-apps/hal/files/0.5.9/series b/sys-apps/hal/files/0.5.9/series index 4193623fd732..29ad87df2dd1 100644 --- a/sys-apps/hal/files/0.5.9/series +++ b/sys-apps/hal/files/0.5.9/series @@ -7,5 +7,6 @@ 07_malloc_h_for_stdlib_h.patch 08_contains_not_fdi_directive.patch 09_hald_addon_keyboard_start_one.patch +10_freebsd_storage_reprobe_fix.patch 95_gentoo_man_page.patch 96_plugdev_allow_send.patch |