rpms/hal/devel hal-0.5.11-addon-input.patch, NONE, 1.1 hal.spec, 1.155, 1.156

David Zeuthen (davidz) fedora-extras-commits at redhat.com
Wed Apr 30 02:02:13 UTC 2008


Author: davidz

Update of /cvs/pkgs/rpms/hal/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv25714

Modified Files:
	hal.spec 
Added Files:
	hal-0.5.11-addon-input.patch 
Log Message:
* Tue Apr 29 2008 David Zeuthen <davidz at redhat.com> - 0.5.11-0.7.rc2
- Fix addon input cpu eating habits (#437500)



hal-0.5.11-addon-input.patch:

--- NEW FILE hal-0.5.11-addon-input.patch ---
From: Jon Oberheide <jon at oberheide.org>
Date: Mon, 21 Apr 2008 09:37:45 +0000 (+0200)
Subject: fix input addon to handle G_IO_NVAL situations
X-Git-Url: http://gitweb.freedesktop.org/?p=hal.git;a=commitdiff;h=38d16647bf66f2e26a882ccd9bb5a0273278338d

fix input addon to handle G_IO_NVAL situations

Fixed input addon to handle G_IO_NVAL situations.

https://bugs.launchpad.net/ubuntu/+source/hal/+bug/203679:
> The file descriptor is closed via remove_device() but not removed
> from poll's fdset. Therefore poll continues to return with the
> POLLNVAL code but it is never handled. The POLLNVAL should be
> handled by adding G_IO_NVAL to the g_io_add_watch_full() event mask
> and then also included in the error condition at the top of
> event_io().
---

--- a/hald/linux/addons/addon-input.c
+++ b/hald/linux/addons/addon-input.c
@@ -210,7 +210,7 @@ event_io (GIOChannel *channel, GIOCondit
 	GError *gerror = NULL;
 	gsize read_bytes;
 
-	if (condition & (G_IO_HUP | G_IO_ERR))
+	if (condition & (G_IO_HUP | G_IO_ERR | G_IO_NVAL))
 		return FALSE;
 
 	/** tbh, we can probably assume every time we read we have a whole
@@ -383,7 +383,7 @@ add_device (LibHalContext *ctx,
 
 	g_hash_table_insert (inputs, g_strdup(udi), channel);
 	g_io_add_watch_full (channel,
-			     G_PRIORITY_DEFAULT, G_IO_IN | G_IO_ERR | G_IO_HUP,
+			     G_PRIORITY_DEFAULT, G_IO_IN | G_IO_ERR | G_IO_HUP | G_IO_NVAL,
 			     event_io, data, (GDestroyNotify) destroy_data);
 }
 


Index: hal.spec
===================================================================
RCS file: /cvs/pkgs/rpms/hal/devel/hal.spec,v
retrieving revision 1.155
retrieving revision 1.156
diff -u -r1.155 -r1.156
--- hal.spec	17 Apr 2008 18:57:31 -0000	1.155
+++ hal.spec	30 Apr 2008 02:01:37 -0000	1.156
@@ -26,12 +26,13 @@
 Summary: Hardware Abstraction Layer
 Name: hal
 Version: 0.5.11
-Release: 0.6.rc2%{?dist}
+Release: 0.7.rc2%{?dist}
 URL: http://www.freedesktop.org/Software/hal
 Source0: http://hal.freedesktop.org/releases/%{name}-%{version}rc2.tar.gz
 Patch1: hal-0.5.10-set-property-direct.patch
 Patch2: hal-0.5.11-remove-at-console.patch
 Patch3: hal-change-priority.patch
+Patch4: hal-0.5.11-addon-input.patch
 License: AFL or GPLv2
 Group: System Environment/Libraries
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) 
@@ -128,6 +129,7 @@
 %patch1 -p1 -b .direct
 %patch2 -p1 -b .no-at-console
 %patch3 -p1 -b .priority
+%patch4 -p1 -b .addon-input
 
 %build
 autoreconf
@@ -272,6 +274,9 @@
 %{_datadir}/gtk-doc/html/libhal-storage/*
 
 %changelog
+* Tue Apr 29 2008 David Zeuthen <davidz at redhat.com> - 0.5.11-0.7.rc2
+- Fix addon input cpu eating habits (#437500)
+
 * Thu Apr 17 2008 Bill Nottingham <notting at redhat.com> - 0.5.11-0.6.rc2
 - Adjust start/stop priority earlier for use by NetworkManager (#441658)
 




More information about the fedora-extras-commits mailing list