|
|
Author: johnp
Update of /cvs/dist/rpms/hal/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv9118
Modified Files:
hal-0.5.7-fix-for-nfs-and-autofs.patch hal.spec
Log Message:
- Updated autofs fix
hal-0.5.7-fix-for-nfs-and-autofs.patch:
blockdev.c | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 54 insertions(+), 1 deletion(-)
Index: hal-0.5.7-fix-for-nfs-and-autofs.patch
===================================================================
RCS file: /cvs/dist/rpms/hal/devel/hal-0.5.7-fix-for-nfs-and-autofs.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- hal-0.5.7-fix-for-nfs-and-autofs.patch 17 May 2006 18:08:07 -0000
1.1
+++ hal-0.5.7-fix-for-nfs-and-autofs.patch 24 May 2006 21:46:03 -0000
1.2
@@ -1,6 +1,14 @@
---- hal-0.5.7/hald/linux2/blockdev.c.fix_for_nfs_and_autofs 2006-05-17
13:50:00.000000000 -0400
-+++ hal-0.5.7/hald/linux2/blockdev.c 2006-05-17 14:01:32.000000000 -0400
-@@ -205,6 +205,21 @@
+--- hal-0.5.7/hald/linux2/blockdev.c.fix-for-nfs-and-autofs 2006-02-23
23:29:06.000000000 -0500
++++ hal-0.5.7/hald/linux2/blockdev.c 2006-05-24 17:43:55.000000000 -0400
+@@ -185,6 +185,7 @@
+ dev_t devt = makedev(0, 0);
+ GSList *volumes = NULL;
+ GSList *volume;
++ GSList *autofs_mounts = NULL;
+
+ /* open /proc/mounts */
+ g_snprintf (buf, sizeof (buf), "%s/mounts", get_hal_proc_path ());
+@@ -205,6 +206,43 @@
while ((mnte = getmntent_r (f, &mnt, buf, sizeof(buf))) != NULL) {
struct stat statbuf;
@@ -19,6 +27,67 @@
+ strcmp(mnt.mnt_type, "autofs") == 0)
+ continue;
+
++ /* If this is an autofs mount (fstype == 'autofs')
++ * store the mount in a list for later use.
++ * On mounts managed by autofs accessing files below the mount
++ * point cause the mount point to be remounted after an
++ * unmount. We keep the list so we do not check for
++ * the .created-by-hal file on mounts under autofs mount points
++ */
++ if (strcmp(mnt.mnt_type, "autofs") == 0) {
++ char *mnt_dir;
++
++ if (mnt.mnt_dir[strlen (mnt.mnt_dir) - 1] != '/')
++ mnt_dir = g_strdup_printf ("%s/", mnt.mnt_dir);
++ else
++ mnt_dir = g_strdup (mnt.mnt_dir);
++
++ autofs_mounts = g_slist_append (autofs_mounts,
++ mnt_dir);
++
++
++ continue;
++ }
++
/* check the underlying device of the mount point */
if (stat (mnt.mnt_dir, &statbuf) != 0)
continue;
+@@ -242,6 +280,7 @@
+ HalDevice *dev;
+ char *mount_point;
+ char *mount_point_hal_file;
++ GSList *autofs_node;
+
+ dev = HAL_DEVICE (volume->data);
+ mount_point = g_strdup (hal_device_property_get_string (dev,
"volume.mount_point"));
+@@ -251,8 +290,20 @@
+ device_property_atomic_update_end ();
+ HAL_INFO (("set %s to unmounted", hal_device_get_udi (dev)));
+
++ /* check to see if mount point falls under autofs */
++ autofs_node = autofs_mounts;
++ while (autofs_node != NULL) {
++ char *am = (char *)autofs_node->data;
++
++ if (strncmp (am, mount_point, strlen (am)) == 0);
++ break;
++
++ autofs_node = autofs_node->next;
++ }
++
+ mount_point_hal_file = g_strdup_printf ("%s/.created-by-hal",
mount_point);
+- if (g_file_test (mount_point_hal_file, G_FILE_TEST_EXISTS)) {
++ if (!autofs_node &&
++ g_file_test (mount_point_hal_file, G_FILE_TEST_EXISTS)) {
+ char *cleanup_stdin;
+ char *extra_env[2];
+
+@@ -279,6 +330,8 @@
+ g_free (mount_point);
+ }
+ g_slist_free (volumes);
++ g_slist_foreach (autofs_mounts, (GFunc) g_free, NULL);
++ g_slist_free (autofs_mounts);
+ exit:
+ endmntent (f);
+ }
Index: hal.spec
===================================================================
RCS file: /cvs/dist/rpms/hal/devel/hal.spec,v
retrieving revision 1.94
retrieving revision 1.95
diff -u -r1.94 -r1.95
--- hal.spec 19 May 2006 14:50:04 -0000 1.94
+++ hal.spec 24 May 2006 21:46:03 -0000 1.95
@@ -20,7 +20,7 @@
Summary: Hardware Abstraction Layer
Name: hal
Version: 0.5.7
-Release: 10
+Release: 11
URL: http://www.freedesktop.org/Software/hal
Source0: %{name}-%{version}.tar.gz
Source1: 99-redhat-storage-policy-fixed-drives.fdi
@@ -203,6 +203,9 @@
%{_bindir}/hal-device-manager
%changelog
+* Wed May 24 2006 John (J5) Palmieri <johnp@xxxxxxxxxx> - 0.5.7-11
+- Updated autofs fix
+
* Fri May 19 2006 David Zeuthen <davidz@xxxxxxxxxx> - 0.5.7-10
- Make PCMCIA card readers work again (#185557)
--
fedora-cvs-commits mailing list
fedora-cvs-commits@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-cvs-commits
|
|