diff options
author | marcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059> | 2009-10-05 03:34:31 +0800 |
---|---|---|
committer | marcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059> | 2009-10-05 03:34:31 +0800 |
commit | 4bc8f30e5c33725bb2c37f422ec6de38dafe959c (patch) | |
tree | 5d80109dc665316b7057d2367c4c2da66e332ec3 | |
parent | cbbf5c0a2724081d61f445332efee120d7adbcb3 (diff) | |
download | marcuscom-ports-4bc8f30e5c33725bb2c37f422ec6de38dafe959c.tar marcuscom-ports-4bc8f30e5c33725bb2c37f422ec6de38dafe959c.tar.gz marcuscom-ports-4bc8f30e5c33725bb2c37f422ec6de38dafe959c.tar.bz2 marcuscom-ports-4bc8f30e5c33725bb2c37f422ec6de38dafe959c.tar.lz marcuscom-ports-4bc8f30e5c33725bb2c37f422ec6de38dafe959c.tar.xz marcuscom-ports-4bc8f30e5c33725bb2c37f422ec6de38dafe959c.tar.zst marcuscom-ports-4bc8f30e5c33725bb2c37f422ec6de38dafe959c.zip |
Ignore ufsid labels outright. These labels are special since they are
created and destroyed based on whether or not the underlying device is
mounted or not. This should fix some weird remounting problems with UFS
volumes as well as some mount contention.
Reported by: avl
git-svn-id: svn://creme-brulee.marcuscom.com/ports/trunk@13089 df743ca5-7f9a-e211-a948-0013205c9059
-rw-r--r-- | sysutils/hal/Makefile | 4 | ||||
-rw-r--r-- | sysutils/hal/files/patch-hald_hf-storage.c | 36 |
2 files changed, 26 insertions, 14 deletions
diff --git a/sysutils/hal/Makefile b/sysutils/hal/Makefile index c1ed98e7a..7f5c9fc3d 100644 --- a/sysutils/hal/Makefile +++ b/sysutils/hal/Makefile @@ -3,12 +3,12 @@ # Whom: Joe Marcus Clarke <marcus@FreeBSD.org> # # $FreeBSD$ -# $MCom: ports/sysutils/hal/Makefile,v 1.66 2009/09/22 05:59:43 marcus Exp $ +# $MCom: ports/sysutils/hal/Makefile,v 1.67 2009/09/26 08:01:20 marcus Exp $ # PORTNAME= hal DISTVERSION= 0.5.13 -PORTREVISION= 8 +PORTREVISION= 9 CATEGORIES= sysutils MASTER_SITES= http://hal.freedesktop.org/releases/ diff --git a/sysutils/hal/files/patch-hald_hf-storage.c b/sysutils/hal/files/patch-hald_hf-storage.c index 65440e796..db2fdd405 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-26 03:51:08.000000000 -0400 ++++ hald/freebsd/hf-storage.c 2009-10-04 15:28:44.000000000 -0400 @@ -30,6 +30,8 @@ #include <limits.h> #include <inttypes.h> @@ -60,7 +60,7 @@ if (hf_runner_run_sync(device, 0, "hald-probe-storage", "HF_HAS_CHILDREN", HF_BOOL_TO_STRING(hf_storage_device_has_partitions(device)), -@@ -403,13 +410,20 @@ hf_storage_parse_conftxt (const char *co +@@ -403,13 +410,32 @@ hf_storage_parse_conftxt (const char *co continue; } @@ -73,6 +73,18 @@ + continue; + } + ++ /* XXX This is a hack, but we need to ignore dynamic labels like ++ * ufsids which are created and destroyed based on whether or not ++ * the actual device is mounted or not. If we don't then strange ++ * things happen in applications like nautilus. ++ */ ++ if (! strcmp(fields[1], "LABEL") && ++ ! strncmp(fields[2], "ufsid/", strlen("ufsid/"))) ++ { ++ g_strfreev(fields); ++ continue; ++ } ++ geom_obj = g_new0(Geom_Object, 1); - depth = atoi(fields[0]); @@ -83,7 +95,7 @@ geom_obj->hash = hash; if (g_strv_length(fields) >= 5) -@@ -433,6 +447,30 @@ hf_storage_parse_conftxt (const char *co +@@ -433,6 +459,30 @@ hf_storage_parse_conftxt (const char *co if (! strcmp (geom_obj->class, "GPT") || ! strcmp (geom_obj->class, "APPLE")) geom_obj->str_type = g_strdup(fields[10]); @@ -114,7 +126,7 @@ else geom_obj->type = atoi(fields[10]); } -@@ -541,17 +579,27 @@ hf_storage_device_rescan_real (HalDevice +@@ -541,17 +591,27 @@ hf_storage_device_rescan_real (HalDevice } static gboolean @@ -145,7 +157,7 @@ new_disks = hf_storage_parse_conftxt(conftxt); g_free(conftxt); -@@ -572,6 +620,7 @@ hf_storage_conftxt_timeout_cb (gpointer +@@ -572,6 +632,7 @@ hf_storage_conftxt_timeout_cb (gpointer if (! hf_storage_find_disk(disks, disk->name)) { osspec_probe(); /* catch new disk(s) */ @@ -153,7 +165,7 @@ break; } } -@@ -593,7 +642,10 @@ hf_storage_conftxt_timeout_cb (gpointer +@@ -593,7 +654,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)) @@ -165,7 +177,7 @@ } } else -@@ -601,7 +653,10 @@ hf_storage_conftxt_timeout_cb (gpointer +@@ -601,7 +665,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")) @@ -177,7 +189,7 @@ } } } -@@ -610,17 +665,30 @@ hf_storage_conftxt_timeout_cb (gpointer +@@ -610,17 +677,30 @@ hf_storage_conftxt_timeout_cb (gpointer g_slist_free(disks); disks = new_disks; @@ -210,7 +222,7 @@ return; conftxt = hf_get_string_sysctl(NULL, "kern.geom.conftxt"); -@@ -636,8 +704,10 @@ hf_storage_init_geom (void) +@@ -636,8 +716,10 @@ hf_storage_init_geom (void) static void hf_storage_init (void) { @@ -222,7 +234,7 @@ } void -@@ -719,8 +789,6 @@ hf_storage_device_add (HalDevice *device +@@ -719,8 +801,6 @@ hf_storage_device_add (HalDevice *device { g_return_if_fail(HAL_IS_DEVICE(device)); @@ -231,7 +243,7 @@ if (hf_device_preprobe(device)) { hf_storage_device_probe(device, FALSE); -@@ -738,7 +806,7 @@ hf_storage_get_geoms (const char *devnam +@@ -738,7 +818,7 @@ hf_storage_get_geoms (const char *devnam g_return_val_if_fail(devname != NULL, NULL); @@ -240,7 +252,7 @@ hash = g_str_hash(devname); node = g_node_find(hf_storage_geom_tree, G_PRE_ORDER, G_TRAVERSE_ALL, -@@ -801,3 +869,7 @@ HFHandler hf_storage_handler = { +@@ -801,3 +881,7 @@ HFHandler hf_storage_handler = { .probe = hf_storage_probe, .device_rescan = hf_storage_device_rescan }; |