diff options
author | kwm <kwm@df743ca5-7f9a-e211-a948-0013205c9059> | 2010-05-12 23:49:19 +0800 |
---|---|---|
committer | kwm <kwm@df743ca5-7f9a-e211-a948-0013205c9059> | 2010-05-12 23:49:19 +0800 |
commit | 926382e09698007dc3472481164045c6b0b9754a (patch) | |
tree | d0ae60e8f02a2f6b230176c1f2dd549262359efb /sysutils/hal/files/patch-hald_hf-storage.c | |
parent | 42048341091e3810049dedfc96d4b312013ab048 (diff) | |
download | marcuscom-ports-926382e09698007dc3472481164045c6b0b9754a.tar marcuscom-ports-926382e09698007dc3472481164045c6b0b9754a.tar.gz marcuscom-ports-926382e09698007dc3472481164045c6b0b9754a.tar.bz2 marcuscom-ports-926382e09698007dc3472481164045c6b0b9754a.tar.lz marcuscom-ports-926382e09698007dc3472481164045c6b0b9754a.tar.xz marcuscom-ports-926382e09698007dc3472481164045c6b0b9754a.tar.zst marcuscom-ports-926382e09698007dc3472481164045c6b0b9754a.zip |
Post 2.30.1 commit clean up.
git-svn-id: svn://creme-brulee.marcuscom.com/ports/trunk@14135 df743ca5-7f9a-e211-a948-0013205c9059
Diffstat (limited to 'sysutils/hal/files/patch-hald_hf-storage.c')
-rw-r--r-- | sysutils/hal/files/patch-hald_hf-storage.c | 79 |
1 files changed, 0 insertions, 79 deletions
diff --git a/sysutils/hal/files/patch-hald_hf-storage.c b/sysutils/hal/files/patch-hald_hf-storage.c deleted file mode 100644 index 162079ac7..000000000 --- a/sysutils/hal/files/patch-hald_hf-storage.c +++ /dev/null @@ -1,79 +0,0 @@ ---- hald/freebsd/hf-storage.c.orig 2009-08-24 08:42:29.000000000 -0400 -+++ hald/freebsd/hf-storage.c 2010-02-26 08:29:38.000000000 -0500 -@@ -30,6 +30,7 @@ - #include <limits.h> - #include <inttypes.h> - #include <string.h> -+#include <unistd.h> - #include <sys/param.h> - #include <sys/types.h> - #include <sys/disklabel.h> -@@ -418,10 +419,41 @@ hf_storage_parse_conftxt (const char *co - 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") || -+ ! strcmp(fields[1], "BSD") || -+ ! strcmp(fields[1], "PART")) && -+ ! (strncmp(fields[2], "ufsid/", strlen("ufsid/")) || -+ ! strncmp(fields[2], "ufs/", strlen("ufs/")))) -+ { -+ g_strfreev(fields); -+ continue; -+ } -+ - geom_obj = g_new0(Geom_Object, 1); - - geom_obj->class = g_strdup(fields[1]); - geom_obj->dev = g_strdup(fields[2]); -+ /* Allow for spaces in label names. */ -+ if (! strcmp(fields[1], "LABEL")) -+ { -+ int j; -+ -+ for (j = 3; g_strv_length(fields) > (j + 2) && -+ strcmp(fields[j + 2], "i"); j++) -+ { -+ char *tmp; -+ -+ tmp = g_strdup_printf("%s %s", geom_obj->dev, fields[j]); -+ g_free(geom_obj->dev); -+ geom_obj->dev = tmp; -+ } -+ } -+ - geom_obj->type = -1; /* We use -1 here to denote a missing type. */ - geom_obj->hash = hash; - -@@ -589,11 +621,16 @@ hf_storage_devd_notify (const char *syst - char *conftxt; - GSList *new_disks; - -- if (strcmp(system, "DEVFS") || strcmp(subsystem, "CDEV") || -+ 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); - g_free(conftxt); - -@@ -669,7 +706,7 @@ hf_storage_conftxt_timeout_cb (gpointer - if (hf_is_waiting) - return TRUE; - -- hf_storage_devd_notify("DEVFS", "CDEV", "CREATE", NULL); -+ hf_storage_devd_notify("DEVFS", "CDEV", "CREATE", ""); - - return TRUE; - } |