Hello community,
here is the log from the commit of package hal
checked in at Wed Nov 28 23:13:13 CET 2007.
--------
--- hal/hal.changes 2007-11-05 12:27:31.000000000 +0100
+++ /mounts/work_src_done/STABLE/hal/hal.changes 2007-11-27 14:09:45.000000000 +0100
@@ -1,0 +2,97 @@
+Tue Nov 27 14:08:59 CET 2007 - dkukawka@suse.de
+
+- synced STABLE/Factory with home:dkukawka:hal-beta
+
+-------------------------------------------------------------------
+Mon Nov 26 22:33:02 CET 2007 - dkukawka@suse.de
+
+- added new patches:
+ - hal-cleanup_set_suspend_hibernate_keys.diff: reuse code, call
+ other codepaths only if really needed
+ - hal-acpi_high_rate_calculate_on_time.diff: (experimental) check
+ if the reporting rate is >= 40Watt and calculate the remaining
+ time in this case not with the rate, but via time and current
+ capacity. (b.n.c #304504)
+- updated patches:
+ - hal-add-standby-support.diff
+
+-------------------------------------------------------------------
+Sat Nov 24 18:27:24 CET 2007 - dkukawka@suse.de
+
+- added already commited patch:
+ - hal-cleanup_device.c.diff
+
+-------------------------------------------------------------------
+Sat Nov 24 13:18:31 CET 2007 - dkukawka@suse.de
+
+- added new patch:
+ - hal-add-drm_subsystem.diff: add the drm subsystem to HAL.
+ Should fix b.n.c #231171 for Intel and ATI drm/dri devices.
+
+-------------------------------------------------------------------
+Tue Nov 20 18:01:24 CET 2007 - dkukawka@suse.de
+
+- updated to hal/hal-info trunk from 20071120
+- added new patch:
+ - hal-fix-partutil_add_more_checks.diff: add some more checks to
+ prevent segafaults
+
+-------------------------------------------------------------------
+Thu Nov 15 14:09:39 CET 2007 - dkukawka@suse.de
+
+- added patch:
+ - hal-fix-remove_spawned_childs.diff: if a device get removed
+ check first if there are childs left and remove them before
+ remove the parent device of a child. This should fix problems
+ with e.g. spawned devices.
+
+-------------------------------------------------------------------
+Thu Nov 15 12:31:02 CET 2007 - dkukawka@suse.de
+
+- added patch:
+ - hal-linux-ignore_drivers_modules_uvents.diff: ignore on linux
+ all events for drivers and module subsystem events. We don't
+ need them atm.
+
+-------------------------------------------------------------------
+Tue Nov 13 22:32:01 CET 2007 - dkukawka@suse.de
+
+- added patch:
+ - hal-fix-libhal_checkUDI_addParameterChecks.diff: check if a
+ given UDI is minimal valid, added some more parameter checks
+
+-------------------------------------------------------------------
+Tue Nov 13 21:18:45 CET 2007 - dkukawka@suse.de
+
+- updated patch:
+ - hal-use-dmi_from_sysfs_v3.diff: use /sys/class/dmi/id
+
+-------------------------------------------------------------------
+Tue Nov 13 18:17:45 CET 2007 - dkukawka@suse.de
+
+- added new patches:
+ - hal-Brightness_Dell_dcdbas.diff
+ - hal-fix-loop_on_empty_fdi_rules.diff
+ - hal-info-killswitch_Dell_dcdbas.diff
+ - hal-use-dmi_from_sysfs_v2.diff
+
+-------------------------------------------------------------------
+Tue Nov 13 16:16:37 CET 2007 - dkukawka@suse.de
+
+- updated to git master from 20071113:
+- removed upstream gone patches:
+ - hal-fix-missing_includes.diff
+ - hal-fix-dellWirelessCtl_0.13.12.diff
+- removed no longer needed patches:
+ - hal-fix-int_outof_4a75be3c.diff
+- updated patches:
+ - hal-fix-storage-policy-fixed-drives.diff
+
+-------------------------------------------------------------------
+Mon Nov 5 19:48:06 CET 2007 - dkukawka@suse.de
+
+- added backported patch from git master:
+ - hal-fix-int_outof_4a75be3c.diff: fix not working int_outof
+ fdi-file directive
+
+-------------------------------------------------------------------
--- hal/hal-doc.changes 2007-11-05 12:28:11.000000000 +0100
+++ /mounts/work_src_done/STABLE/hal/hal-doc.changes 2007-11-27 14:08:23.000000000 +0100
@@ -1,0 +2,92 @@
+Mon Nov 26 22:33:02 CET 2007 - dkukawka@suse.de
+
+- added new patches:
+ - hal-cleanup_set_suspend_hibernate_keys.diff: reuse code, call
+ other codepaths only if really needed
+ - hal-acpi_high_rate_calculate_on_time.diff: (experimental) check
+ if the reporting rate is >= 40Watt and calculate the remaining
+ time in this case not with the rate, but via time and current
+ capacity. (b.n.c #304504)
+- updated patches:
+ - hal-add-standby-support.diff
+
+-------------------------------------------------------------------
+Sat Nov 24 18:27:24 CET 2007 - dkukawka@suse.de
+
+- added already commited patch:
+ - hal-cleanup_device.c.diff
+
+-------------------------------------------------------------------
+Sat Nov 24 13:18:31 CET 2007 - dkukawka@suse.de
+
+- added new patch:
+ - hal-add-drm_subsystem.diff: add the drm subsystem to HAL.
+ Should fix b.n.c #231171 for Intel and ATI drm/dri devices.
+
+-------------------------------------------------------------------
+Tue Nov 20 18:01:24 CET 2007 - dkukawka@suse.de
+
+- updated to hal/hal-info trunk from 20071120
+- added new patch:
+ - hal-fix-partutil_add_more_checks.diff: add some more checks to
+ prevent segafaults
+
+-------------------------------------------------------------------
+Thu Nov 15 14:09:39 CET 2007 - dkukawka@suse.de
+
+- added patch:
+ - hal-fix-remove_spawned_childs.diff: if a device get removed
+ check first if there are childs left and remove them before
+ remove the parent device of a child. This should fix problems
+ with e.g. spawned devices.
+
+-------------------------------------------------------------------
+Thu Nov 15 12:31:02 CET 2007 - dkukawka@suse.de
+
+- added patch:
+ - hal-linux-ignore_drivers_modules_uvents.diff: ignore on linux
+ all events for drivers and module subsystem events. We don't
+ need them atm.
+
+-------------------------------------------------------------------
+Tue Nov 13 22:32:01 CET 2007 - dkukawka@suse.de
+
+- added patch:
+ - hal-fix-libhal_checkUDI_addParameterChecks.diff: check if a
+ given UDI is minimal valid, added some more parameter checks
+
+-------------------------------------------------------------------
+Tue Nov 13 21:18:45 CET 2007 - dkukawka@suse.de
+
+- updated patch:
+ - hal-use-dmi_from_sysfs_v3.diff: use /sys/class/dmi/id
+
+-------------------------------------------------------------------
+Tue Nov 13 18:17:45 CET 2007 - dkukawka@suse.de
+
+- added new patches:
+ - hal-Brightness_Dell_dcdbas.diff
+ - hal-fix-loop_on_empty_fdi_rules.diff
+ - hal-info-killswitch_Dell_dcdbas.diff
+ - hal-use-dmi_from_sysfs_v2.diff
+
+-------------------------------------------------------------------
+Tue Nov 13 16:16:37 CET 2007 - dkukawka@suse.de
+
+- updated to git master from 20071113:
+- removed upstream gone patches:
+ - hal-fix-missing_includes.diff
+ - hal-fix-dellWirelessCtl_0.13.12.diff
+- removed no longer needed patches:
+ - hal-fix-int_outof_4a75be3c.diff
+- updated patches:
+ - hal-fix-storage-policy-fixed-drives.diff
+
+-------------------------------------------------------------------
+Mon Nov 5 19:48:06 CET 2007 - dkukawka@suse.de
+
+- added backported patch from git master:
+ - hal-fix-int_outof_4a75be3c.diff: fix not working int_outof
+ fdi-file directive
+
+-------------------------------------------------------------------
Old:
----
hal-0.5.10_git20071017.tar.bz2
hal-fix-dellWirelessCtl_0.13.12.diff
hal-fix-missing_includes.diff
hal-info-20071017.tar.bz2
New:
----
hal-0.5.10_git20071120.tar.bz2
hal-acpi_high_rate_calculate_on_time.diff
hal-add-drm_subsystem.diff
hal-Brightness_Dell_dcdbas.diff
hal-cleanup_device.c.diff
hal-cleanup_set_suspend_hibernate_keys.diff
hal-fix-libhal_checkUDI_addParameterChecks.diff
hal-fix-loop_on_empty_fdi_rules.diff
hal-fix-partutil_add_more_checks.diff
hal-fix-remove_spawned_childs.diff
hal-info-20071120.tar.bz2
hal-info-killswitch_Dell_dcdbas.diff
hal-linux-ignore_drivers_modules_uvents.diff
hal-performance-changes.diff
hal-use-dmi_from_sysfs_v3.diff
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ hal-doc.spec ++++++
--- /var/tmp/diff_new_pack.t22104/_old 2007-11-28 23:12:19.000000000 +0100
+++ /var/tmp/diff_new_pack.t22104/_new 2007-11-28 23:12:19.000000000 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package hal-doc (Version 0.5.10_git20071017 )
+# spec file for package hal-doc (Version 0.5.10_git20071120 )
#
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -18,12 +18,12 @@
Summary: Daemon for Collecting Hardware Information
%define dbus_version 0.61
%define dbus_release 1
-%define hal_info_version 20071017
+%define hal_info_version 20071120
Url: http://freedesktop.org/Software/hal
License: Other uncritical OpenSource License
Group: System/Daemons
-Version: 0.5.10_git20071017
-Release: 12
+Version: 0.5.10_git20071120
+Release: 1
AutoReqProv: on
Requires: pm-utils
BuildRequires: ConsoleKit-devel PolicyKit-devel dbus-1-glib-devel glib2-devel gperf intltool libexpat-devel libusb libusb-devel libvolume_id-devel parted parted-devel pciutils pciutils-devel perl-XML-Parser popt-devel python-devel update-desktop-files
@@ -74,18 +74,29 @@
Patch100: hal-fix-util_compute_time_remaining_warning_highTime.diff
Patch101: hal-fix-acpi_on_battery_discharging.diff
Patch102: hal-fix-prevent_eject_method_for_dm-devices.diff
-Patch103: hal-fix-missing_includes.diff
-Patch104: hal-fix-dellWirelessCtl_0.13.12.diff
+Patch103: hal-fix-loop_on_empty_fdi_rules.diff
+Patch104: hal-use-dmi_from_sysfs_v3.diff
+Patch105: hal-Brightness_Dell_dcdbas.diff
+Patch106: hal-linux-ignore_drivers_modules_uvents.diff
+Patch107: hal-fix-remove_spawned_childs.diff
+Patch108: hal-fix-partutil_add_more_checks.diff
+Patch109: hal-fix-libhal_checkUDI_addParameterChecks.diff
+Patch110: hal-cleanup_device.c.diff
+Patch111: hal-add-drm_subsystem.diff
+Patch112: hal-cleanup_set_suspend_hibernate_keys.diff
+Patch113: hal-acpi_high_rate_calculate_on_time.diff
# backports from git HEAD:
-#Patch200: hal-backport.diff
+#Patch200: hal-.diff
# revert from HEAD:
#Patch250: hal-revert.diff
+# patches from ML:
+Patch300: hal-performance-changes.diff
# hal-info related patches:
-#Patch300: hal-info-.diff
+Patch400: hal-info-killswitch_Dell_dcdbas.diff
# currently unused patches:
Patch500: hal-cleanup-deprecated_libhal-storage.diff
-# temporary debug patche
-#Patch1000: hal-temp.diff
+# temporary debug patches
+#Patch1000: hal-debug.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
#
@@ -111,6 +122,7 @@
David Zeuthen
%if ! %build_doc
+
%package -n hal-devel
Summary: Developer package for HAL
Requires: %{name} = %{version}-%{release}, dbus-1-devel >= %{dbus_version}-%{dbus_release}, dbus-1-glib-devel >= %{dbus_version}-%{dbus_release}
@@ -151,6 +163,7 @@
David Zeuthen
%endif
+
%prep
%setup -n hal-%{version} -a1
chmod 644 tools/hal-functions
@@ -159,16 +172,27 @@
%patch1 -p0
%patch2 -p1
%patch3 -p0
-%patch10 -p0
%patch100 -p1
%patch101 -p1
%patch102 -p1
%patch103 -p1
%patch104 -p1
+%patch105 -p1
+%patch106 -p1
+%patch107 -p1
+%patch108 -p1
+%patch109 -p1
+%patch110 -p1
+%patch111 -p1
+%patch112 -p1
+%patch113 -p1
+%patch10 -p0
+#%patch200 -p1
+#%patch300 -p1
#%patch1000 -p1
# patch hal-info package if needed
pushd hal-info-%{hal_info_version}
-#%patch300 -p1
+%patch400 -p1
popd
%build
@@ -325,7 +349,67 @@
%{_libdir}/lib*.so
%{_libdir}/pkgconfig/*
%endif
+
%changelog
+* Mon Nov 26 2007 - dkukawka@suse.de
+- added new patches:
+ - hal-cleanup_set_suspend_hibernate_keys.diff: reuse code, call
+ other codepaths only if really needed
+ - hal-acpi_high_rate_calculate_on_time.diff: (experimental) check
+ if the reporting rate is >= 40Watt and calculate the remaining
+ time in this case not with the rate, but via time and current
+ capacity. (b.n.c #304504)
+- updated patches:
+ - hal-add-standby-support.diff
+* Sat Nov 24 2007 - dkukawka@suse.de
+- added already commited patch:
+ - hal-cleanup_device.c.diff
+* Sat Nov 24 2007 - dkukawka@suse.de
+- added new patch:
+ - hal-add-drm_subsystem.diff: add the drm subsystem to HAL.
+ Should fix b.n.c #231171 for Intel and ATI drm/dri devices.
+* Tue Nov 20 2007 - dkukawka@suse.de
+- updated to hal/hal-info trunk from 20071120
+- added new patch:
+ - hal-fix-partutil_add_more_checks.diff: add some more checks to
+ prevent segafaults
+* Thu Nov 15 2007 - dkukawka@suse.de
+- added patch:
+ - hal-fix-remove_spawned_childs.diff: if a device get removed
+ check first if there are childs left and remove them before
+ remove the parent device of a child. This should fix problems
+ with e.g. spawned devices.
+* Thu Nov 15 2007 - dkukawka@suse.de
+- added patch:
+ - hal-linux-ignore_drivers_modules_uvents.diff: ignore on linux
+ all events for drivers and module subsystem events. We don't
+ need them atm.
+* Tue Nov 13 2007 - dkukawka@suse.de
+- added patch:
+ - hal-fix-libhal_checkUDI_addParameterChecks.diff: check if a
+ given UDI is minimal valid, added some more parameter checks
+* Tue Nov 13 2007 - dkukawka@suse.de
+- updated patch:
+ - hal-use-dmi_from_sysfs_v3.diff: use /sys/class/dmi/id
+* Tue Nov 13 2007 - dkukawka@suse.de
+- added new patches:
+ - hal-Brightness_Dell_dcdbas.diff
+ - hal-fix-loop_on_empty_fdi_rules.diff
+ - hal-info-killswitch_Dell_dcdbas.diff
+ - hal-use-dmi_from_sysfs_v2.diff
+* Tue Nov 13 2007 - dkukawka@suse.de
+- updated to git master from 20071113:
+- removed upstream gone patches:
+ - hal-fix-missing_includes.diff
+ - hal-fix-dellWirelessCtl_0.13.12.diff
+- removed no longer needed patches:
+ - hal-fix-int_outof_4a75be3c.diff
+- updated patches:
+ - hal-fix-storage-policy-fixed-drives.diff
+* Mon Nov 05 2007 - dkukawka@suse.de
+- added backported patch from git master:
+ - hal-fix-int_outof_4a75be3c.diff: fix not working int_outof
+ fdi-file directive
* Sun Nov 04 2007 - dkukawka@suse.de
- added new patch:
- hal-fix-dellWirelessCtl_0.13.12.diff: added support for the
++++++ hal.spec ++++++
--- /var/tmp/diff_new_pack.t22104/_old 2007-11-28 23:12:19.000000000 +0100
+++ /var/tmp/diff_new_pack.t22104/_new 2007-11-28 23:12:19.000000000 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package hal (Version 0.5.10_git20071017 )
+# spec file for package hal (Version 0.5.10_git20071120 )
#
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -18,12 +18,12 @@
Summary: Daemon for Collecting Hardware Information
%define dbus_version 0.61
%define dbus_release 1
-%define hal_info_version 20071017
+%define hal_info_version 20071120
Url: http://freedesktop.org/Software/hal
License: GPL v2 or later; AFL
Group: System/Daemons
-Version: 0.5.10_git20071017
-Release: 10
+Version: 0.5.10_git20071120
+Release: 1
AutoReqProv: on
Requires: pm-utils
BuildRequires: ConsoleKit-devel PolicyKit-devel dbus-1-glib-devel glib2-devel gperf intltool libexpat-devel libusb libusb-devel libvolume_id-devel parted parted-devel pciutils pciutils-devel perl-XML-Parser popt-devel python-devel update-desktop-files
@@ -74,18 +74,29 @@
Patch100: hal-fix-util_compute_time_remaining_warning_highTime.diff
Patch101: hal-fix-acpi_on_battery_discharging.diff
Patch102: hal-fix-prevent_eject_method_for_dm-devices.diff
-Patch103: hal-fix-missing_includes.diff
-Patch104: hal-fix-dellWirelessCtl_0.13.12.diff
+Patch103: hal-fix-loop_on_empty_fdi_rules.diff
+Patch104: hal-use-dmi_from_sysfs_v3.diff
+Patch105: hal-Brightness_Dell_dcdbas.diff
+Patch106: hal-linux-ignore_drivers_modules_uvents.diff
+Patch107: hal-fix-remove_spawned_childs.diff
+Patch108: hal-fix-partutil_add_more_checks.diff
+Patch109: hal-fix-libhal_checkUDI_addParameterChecks.diff
+Patch110: hal-cleanup_device.c.diff
+Patch111: hal-add-drm_subsystem.diff
+Patch112: hal-cleanup_set_suspend_hibernate_keys.diff
+Patch113: hal-acpi_high_rate_calculate_on_time.diff
# backports from git HEAD:
-#Patch200: hal-backport.diff
+#Patch200: hal-.diff
# revert from HEAD:
#Patch250: hal-revert.diff
+# patches from ML:
+Patch300: hal-performance-changes.diff
# hal-info related patches:
-#Patch300: hal-info-.diff
+Patch400: hal-info-killswitch_Dell_dcdbas.diff
# currently unused patches:
Patch500: hal-cleanup-deprecated_libhal-storage.diff
-# temporary debug patche
-#Patch1000: hal-temp.diff
+# temporary debug patches
+#Patch1000: hal-debug.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
#
@@ -111,6 +122,7 @@
David Zeuthen
%if ! %build_doc
+
%package -n hal-devel
Summary: Developer package for HAL
Requires: %{name} = %{version}-%{release}, dbus-1-devel >= %{dbus_version}-%{dbus_release}, dbus-1-glib-devel >= %{dbus_version}-%{dbus_release}
@@ -151,6 +163,7 @@
David Zeuthen
%endif
+
%prep
%setup -n hal-%{version} -a1
chmod 644 tools/hal-functions
@@ -159,16 +172,27 @@
%patch1 -p0
%patch2 -p1
%patch3 -p0
-%patch10 -p0
%patch100 -p1
%patch101 -p1
%patch102 -p1
%patch103 -p1
%patch104 -p1
+%patch105 -p1
+%patch106 -p1
+%patch107 -p1
+%patch108 -p1
+%patch109 -p1
+%patch110 -p1
+%patch111 -p1
+%patch112 -p1
+%patch113 -p1
+%patch10 -p0
+#%patch200 -p1
+#%patch300 -p1
#%patch1000 -p1
# patch hal-info package if needed
pushd hal-info-%{hal_info_version}
-#%patch300 -p1
+%patch400 -p1
popd
%build
@@ -325,7 +349,69 @@
%{_libdir}/lib*.so
%{_libdir}/pkgconfig/*
%endif
+
%changelog
+* Tue Nov 27 2007 - dkukawka@suse.de
+- synced STABLE/Factory with home:dkukawka:hal-beta
+* Mon Nov 26 2007 - dkukawka@suse.de
+- added new patches:
+ - hal-cleanup_set_suspend_hibernate_keys.diff: reuse code, call
+ other codepaths only if really needed
+ - hal-acpi_high_rate_calculate_on_time.diff: (experimental) check
+ if the reporting rate is >= 40Watt and calculate the remaining
+ time in this case not with the rate, but via time and current
+ capacity. (b.n.c #304504)
+- updated patches:
+ - hal-add-standby-support.diff
+* Sat Nov 24 2007 - dkukawka@suse.de
+- added already commited patch:
+ - hal-cleanup_device.c.diff
+* Sat Nov 24 2007 - dkukawka@suse.de
+- added new patch:
+ - hal-add-drm_subsystem.diff: add the drm subsystem to HAL.
+ Should fix b.n.c #231171 for Intel and ATI drm/dri devices.
+* Tue Nov 20 2007 - dkukawka@suse.de
+- updated to hal/hal-info trunk from 20071120
+- added new patch:
+ - hal-fix-partutil_add_more_checks.diff: add some more checks to
+ prevent segafaults
+* Thu Nov 15 2007 - dkukawka@suse.de
+- added patch:
+ - hal-fix-remove_spawned_childs.diff: if a device get removed
+ check first if there are childs left and remove them before
+ remove the parent device of a child. This should fix problems
+ with e.g. spawned devices.
+* Thu Nov 15 2007 - dkukawka@suse.de
+- added patch:
+ - hal-linux-ignore_drivers_modules_uvents.diff: ignore on linux
+ all events for drivers and module subsystem events. We don't
+ need them atm.
+* Tue Nov 13 2007 - dkukawka@suse.de
+- added patch:
+ - hal-fix-libhal_checkUDI_addParameterChecks.diff: check if a
+ given UDI is minimal valid, added some more parameter checks
+* Tue Nov 13 2007 - dkukawka@suse.de
+- updated patch:
+ - hal-use-dmi_from_sysfs_v3.diff: use /sys/class/dmi/id
+* Tue Nov 13 2007 - dkukawka@suse.de
+- added new patches:
+ - hal-Brightness_Dell_dcdbas.diff
+ - hal-fix-loop_on_empty_fdi_rules.diff
+ - hal-info-killswitch_Dell_dcdbas.diff
+ - hal-use-dmi_from_sysfs_v2.diff
+* Tue Nov 13 2007 - dkukawka@suse.de
+- updated to git master from 20071113:
+- removed upstream gone patches:
+ - hal-fix-missing_includes.diff
+ - hal-fix-dellWirelessCtl_0.13.12.diff
+- removed no longer needed patches:
+ - hal-fix-int_outof_4a75be3c.diff
+- updated patches:
+ - hal-fix-storage-policy-fixed-drives.diff
+* Mon Nov 05 2007 - dkukawka@suse.de
+- added backported patch from git master:
+ - hal-fix-int_outof_4a75be3c.diff: fix not working int_outof
+ fdi-file directive
* Sun Nov 04 2007 - dkukawka@suse.de
- added new patch:
- hal-fix-dellWirelessCtl_0.13.12.diff: added support for the
++++++ hal-0.5.10_git20071017.tar.bz2 -> hal-0.5.10_git20071120.tar.bz2 ++++++
++++ 1795 lines of diff (skipped)
++++ retrying with extended exclude list
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/hal-0.5.10_git20071017/ChangeLog new/hal-0.5.10_git20071120/ChangeLog
--- old/hal-0.5.10_git20071017/ChangeLog 2007-10-17 15:39:16.000000000 +0200
+++ new/hal-0.5.10_git20071120/ChangeLog 2007-11-20 18:00:59.000000000 +0100
@@ -1,3 +1,271 @@
+commit d0794f6c3d61e0bb396d2c08604c332a9c035921
+Author: Guillem Jover
+Date: Tue Nov 20 15:36:20 2007 +0100
+
+ switch probe-net-bluetooth to use changesets
+
+ Switch probe-net-bluetooth to use changesets.
+
+ hald/linux/probing/probe-net-bluetooth.c | 22 +++++++++++++++++-----
+ 1 files changed, 17 insertions(+), 5 deletions(-)
+
+commit 031cbb3317250bca61de97d62df334b907c6b4be
+Author: Guillem Jover
+Date: Tue Nov 20 15:30:44 2007 +0100
+
+ probe-net-bluetooth: get property from env instead of asking hald
+
+ Get property from environment instead of asking hald.
+
+ hald/linux/probing/probe-net-bluetooth.c | 13 +++++++------
+ 1 files changed, 7 insertions(+), 6 deletions(-)
+
+commit 7f414a36784efa0dbef3a337518dc3cd3a1d7b4a
+Author: Guillem Jover
+Date: Tue Nov 20 15:00:29 2007 +0100
+
+ dereference pointer after checking it's not NULL
+
+ Dereference pointer after checking it's not NULL in
+ partutil/partutil.c.
+
+ partutil/partutil.c | 24 ++++++++++++++++++------
+ 1 files changed, 18 insertions(+), 6 deletions(-)
+
+commit 522f8bede85239dc0279a94d0b1e9c1da4e601f6
+Author: Guillem Jover
+Date: Tue Nov 20 14:50:43 2007 +0100
+
+ libhal: do not dereference *reason_why_locked if it's NULL
+
+ Do not dereference *reason_why_locked if it's NULL after call
+ dbus_malloc0().
+
+ libhal/libhal.c | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+commit 02d471d199d6a50f989cde9f452f5f70dc9f7a3d
+Author: Guillem Jover
+Date: Tue Nov 20 14:47:35 2007 +0100
+
+ fix file descriptor leaks on error conditions
+
+ Fixed file descriptor leaks on error conditions if open()
+ used.
+
+ hald/create_cache.c | 3 +-
+ hald/linux/addons/addon-omap-backlight.c | 36
+ ++++++++++++++++++-----------
+ 2 files changed, 24 insertions(+), 15 deletions(-)
+
+commit b9826360e9149c34e3871cd848168fd7d06b80f3
+Author: Guillem Jover
+Date: Tue Nov 20 14:37:38 2007 +0100
+
+ fixed indentation
+
+ Fixed indentation in hald-addon-omap-backlight.
+
+ hald/linux/addons/addon-omap-backlight.c | 211
+ +++++++++++++++---------------
+ 1 files changed, 106 insertions(+), 105 deletions(-)
+
+commit 1852641290ec7c0f75e85ba8ef794c0e74923677
+Author: Michael E Brown
+Date: Thu Nov 15 21:35:26 2007 +0100
+
+ fix version check code for libmsbios in configure.in
+
+ This patch fixes the version check for libsmbios. It currently
+ fails if the major bumps (which I am planning to do shortly).
+
+ configure.in | 3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+commit 534735f7844300fec22cfebcf515ca46c9b91879
+Author: Guillem Jover
+Date: Mon Nov 12 20:03:34 2007 +0100
+
+ fixed possible inifinite loop when removing trailing spaces
+
+ Fixed possible inifinite loop when removing trailing spaces. Athough
+ this is not going to happen given current content of the files
+ parsed, there's the possibility that the loop could never end.
+
+ hald/linux/probing/probe-smbios.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit ec7703996ece6aa53eea002d194384cf419b2796
+Author: Danny Kukawka
+Date: Mon Nov 12 19:56:31 2007 +0100
+
+ removed double definition of HAL_HELPER_TIMEOUT
+
+ Removed double definition of HAL_HELPER_TIMEOUT in hald/util.h and
+ hald/hald_runner.h which could cause problems if one of the both
+ values get may changed in the future.
+
+ Since the timeout is needed for hald_runner calls removed the
+ define from hald/util.h.
+
+ hald/util.h | 1 -
+ 1 files changed, 0 insertions(+), 1 deletions(-)
+
+commit 64e4ac8ff8570f315c6a99cdf6d221ba845dcf5a
+Author: Danny Kukawka
+Date: Mon Nov 12 19:48:59 2007 +0100
+
+ fix hal to work with libsmbios v0.13.12
+
+ Fixed HAL to work again with libsmbios v0.13.12 where the binaries
+ get moved from /usr/bin/ to /usr/sbin/. Needed to change some paths
+ in hal-system-killswitch-{g,s}et-power-linux to work with the new
+ and older versions correctly.
+
+ tools/linux/hal-system-killswitch-get-power-linux | 15 +++++++++++----
+ tools/linux/hal-system-killswitch-set-power-linux | 19
+ +++++++++++++------
+ 2 files changed, 24 insertions(+), 10 deletions(-)
+
+commit dd44931834020a50ad7cfe0900a6af315010e575
+Author: Danny Kukawka
+Date: Sun Nov 11 18:56:05 2007 +0100
+
+ update dmi chassis types
+
+ Updated dmi chassis types (added 0x1A and 0x1B), added comment
+ about the related numbers which represent the text.
+
+ hald/linux/osspec.c | 4 +++-
+ 1 files changed, 3 insertions(+), 1 deletions(-)
+
+commit 4a75be3cee0cc71b694296bdc679ed0578fabf4a
+Author: Frederic Crozat
+Date: Mon Nov 5 19:44:14 2007 +0100
+
+ fix for int_outof
+
+ I discovered a bug in int_outof implementation, which wasn't working
+ at all and I fixed it while discussing with David over IRC.
+
+ But it seems my patch never got committed, Here it is
+
+ hald/create_cache.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit fa857d10e83fab9bdf0bacf72c55547177ac43fc
+Author: Jeff Mitchell
+Date: Fri Nov 2 14:58:38 2007 -0400
+
+ Saw that the description here hadn't been updated from long-ago
+ changes.
+
+ doc/spec/hal-spec-properties.xml | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit b8123a11b9b03e9c8db10039242d57533816c3a0
+Author: Danny Kukawka
+Date: Tue Oct 30 19:12:32 2007 +0100
+
+ fixed missing includes partly for gcc 4.3
+
+ Fixed compiler warning caused by missing includes in
+ hal-disable-polling.c.
+ Fixed also missing include of string.h for gcc 4.3.
+
+ hald/linux/addons/addon-dell-backlight.cpp | 1 +
+ tools/hal-disable-polling.c | 2 ++
+ 2 files changed, 3 insertions(+), 0 deletions(-)
+
+commit 5958eefdceec19f7b66343ec368710784908fc63
+Author: Danny Kukawka
+Date: Tue Oct 30 14:46:44 2007 +0100
+
+ quick fix for make dist/distcheck due to WOL
+
+ Fixed (quick ...) make distcheck due to linking WOL files for linux
+ in tools/linux/. Use install-data-hook and uninstall-hook to be sure
+ that hal-system-wol-linux is installed before call 'ln -sf'.
+
+ tools/linux/Makefile.am | 10 +++++-----
+ 1 files changed, 5 insertions(+), 5 deletions(-)
+
+commit b1b9c0b0eb25b7a7eb070380eac66603eb0d37db
+Author: Danny Kukawka
+Date: Tue Oct 30 13:55:02 2007 +0100
+
+ make new scripts for WOL executable
+
+ Maked new scripts for WOL executable.
+
+ 0 files changed, 0 insertions(+), 0 deletions(-)
+
+commit adec1e7dfd0464ad067f690548319723475866a9
+Author: Danny Kukawka
+Date: Tue Oct 30 13:16:52 2007 +0100
+
+ added missing file from commit eb6d5b9c
+
+ Added missing file (tools/linux/hal-system-wol-linux) from commit
+ eb6d5b9c.
+
+ tools/linux/hal-system-wol-linux | 81
+ ++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 81 insertions(+), 0 deletions(-)
+
+commit eb6d5b9c24e4eb42a8e9993a3936cf95aafacf12
+Author: Holger Macht
+Date: Mon Oct 29 15:44:06 2007 -0400
+
+ add support for Wake On LAN
+
+ On Tue 28. Aug - 14:21:42, David Zeuthen wrote:
+ >
+ > On Tue, 2007-08-14 at 15:22 +0200, Holger Macht wrote:
+ > > +wol_supported() {
+ > > + UDI=$1
+ > > +
+ > > + IFACE=`hal-get-property --udi $UDI --key net.interface`
+ > > + if [ -z "$IFACE" ]; then
+ > > + echo "org.freedesktop.Hal.Device.WakeOnLAN.NotSupported"
+ > > + return 1
+ > > + fi
+ >
+ > Actually I think IFACE is the same as HAL_PROP_NET_INTERFACE;
+ saves a
+ > fork + some IPC. Ditto for getting other properties too.
+ >
+ > Btw, there should probably exist tools/hal-system-wol-* that
+ looks sorta
+ > like this (this is snipped from another script in tools/) to check
+ > whether the caller is actually privileged to do this
+ >
+ > #!/bin/sh
+ > . hal-functions
+ >
+ > hal_check_priv org.freedesktop.hal.wol.<the-action>
+ > hal_exec_backend
+ >
+ > and you should define these PolicyKit actions in
+ policy/hal-wol.policy
+
+ Added PolicyKit support and included suggestions from Dan Nicholson.
+
+ This time, everything is included in one single patch.
+
+ doc/spec/hal-spec-interfaces.xml | 55
+ +++++++++++++++++++++++++++++++++++++
+ fdi/policy/10osvendor/30-wol.fdi | 28 +++++++++++++++++++
+ fdi/policy/10osvendor/Makefile.am | 3 +-
+ policy/Makefile.am | 3 +-
+ policy/hal-wol.policy | 35 +++++++++++++++++++++++
+ tools/Makefile.am | 3 ++
+ tools/hal-system-wol-enable | 24 ++++++++++++++++
+ tools/hal-system-wol-enabled | 20 +++++++++++++
+ tools/hal-system-wol-supported | 20 +++++++++++++
+ tools/linux/Makefile.am | 11 +++++++-
+ 10 files changed, 199 insertions(+), 3 deletions(-)
+
commit 1491787fdf29fd77e4cbd13af70434ee3e7032ee
Author: Danny Kukawka
Date: Wed Oct 17 13:25:09 2007 +0200
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/hal-0.5.10_git20071017/configure.in new/hal-0.5.10_git20071120/configure.in
--- old/hal-0.5.10_git20071017/configure.in 2007-10-17 15:29:58.000000000 +0200
+++ new/hal-0.5.10_git20071120/configure.in 2007-11-20 17:24:58.000000000 +0100
@@ -7,7 +7,7 @@
#
AC_PREREQ(2.59c)
-AC_INIT(hal, 0.5.10_git20071017, dkukawka@sus.de)
+AC_INIT(hal, 0.5.10_git20071120, dkukawka@suse.de)
AM_INIT_AUTOMAKE([gnu 1.9])
AM_MAINTAINER_MODE
@@ -405,7 +405,8 @@
if ( sscanf( LIBSMBIOS_RELEASE_VERSION , "%d.%d.%d", &major, &minor, µ ) == 3 ) {
if ((major == 0 && minor == 13 && micro >= 4) ||
- (major >= 0 && minor > 13)) {
+ (major == 0 && minor > 13) ||
+ (major >= 0)) {
return 0;
}
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/hal-0.5.10_git20071017/doc/api/libhal/html/index.html new/hal-0.5.10_git20071120/doc/api/libhal/html/index.html
--- old/hal-0.5.10_git20071017/doc/api/libhal/html/index.html 2007-10-17 15:39:25.000000000 +0200
+++ new/hal-0.5.10_git20071120/doc/api/libhal/html/index.html 2007-11-20 18:01:02.000000000 +0100
@@ -24,7 +24,7 @@
<code class="email"><<a href="mailto:david@fubar.dk">david@fubar.dk</a>></code><br>
</p></div></div>
</div></div></div>
-<div><p class="releaseinfo">Version 0.5.10_git20071017
+<div><p class="releaseinfo">Version 0.5.10_git20071120
</p></div>
<div><p class="copyright">Copyright © 2007 The HAL Authors</p></div>
<div><div class="legalnotice">
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/hal-0.5.10_git20071017/doc/api/libhal/version.xml new/hal-0.5.10_git20071120/doc/api/libhal/version.xml
--- old/hal-0.5.10_git20071017/doc/api/libhal/version.xml 2007-10-17 15:31:37.000000000 +0200
+++ new/hal-0.5.10_git20071120/doc/api/libhal/version.xml 2007-11-20 17:25:47.000000000 +0100
@@ -1 +1 @@
-0.5.10_git20071017
+0.5.10_git20071120
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/hal-0.5.10_git20071017/doc/api/libhal-storage/html/index.html new/hal-0.5.10_git20071120/doc/api/libhal-storage/html/index.html
--- old/hal-0.5.10_git20071017/doc/api/libhal-storage/html/index.html 2007-10-17 15:39:25.000000000 +0200
+++ new/hal-0.5.10_git20071120/doc/api/libhal-storage/html/index.html 2007-11-20 18:01:02.000000000 +0100
@@ -24,7 +24,7 @@
<code class="email"><<a href="mailto:david@fubar.dk">david@fubar.dk</a>></code><br>
</p></div></div>
</div></div></div>
-<div><p class="releaseinfo">Version 0.5.10_git20071017
+<div><p class="releaseinfo">Version 0.5.10_git20071120
</p></div>
<div><p class="copyright">Copyright © 2007 The HAL Authors</p></div>
<div><div class="legalnotice">
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/hal-0.5.10_git20071017/doc/api/libhal-storage/html/version.xml new/hal-0.5.10_git20071120/doc/api/libhal-storage/html/version.xml
--- old/hal-0.5.10_git20071017/doc/api/libhal-storage/html/version.xml 2007-10-17 15:39:25.000000000 +0200
+++ new/hal-0.5.10_git20071120/doc/api/libhal-storage/html/version.xml 2007-11-20 18:01:02.000000000 +0100
@@ -1 +1 @@
-0.5.10_git20071017
+0.5.10_git20071120
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/hal-0.5.10_git20071017/doc/api/libhal-storage/version.xml new/hal-0.5.10_git20071120/doc/api/libhal-storage/version.xml
--- old/hal-0.5.10_git20071017/doc/api/libhal-storage/version.xml 2007-10-17 15:31:37.000000000 +0200
+++ new/hal-0.5.10_git20071120/doc/api/libhal-storage/version.xml 2007-11-20 17:25:48.000000000 +0100
@@ -1 +1 @@
-0.5.10_git20071017
+0.5.10_git20071120
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/hal-0.5.10_git20071017/doc/spec/hal-spec-interfaces.xml new/hal-0.5.10_git20071120/doc/spec/hal-spec-interfaces.xml
--- old/hal-0.5.10_git20071017/doc/spec/hal-spec-interfaces.xml 2007-10-17 13:28:12.000000000 +0200
+++ new/hal-0.5.10_git20071120/doc/spec/hal-spec-interfaces.xml 2007-11-20 16:02:54.000000000 +0100
@@ -878,6 +878,61 @@
</para>
</sect1>
+ <sect1 id="interface-wakeonlan">
+ <title>org.freedesktop.Hal.Device.WakeOnLan interface</title>
+ <para>
+ This interface provides a mechanism to configure Wake On LAN
+ capabilities. The following methods are available:
+ </para>
+
+ <informaltable>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Method</entry>
+ <entry>Returns</entry>
+ <entry>Parameters</entry>
+ <entry>Throws</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>GetSupported</entry>
+ <entry>Bool</entry>
+ <entry></entry>
+ <entry>WakeOnLan.NoEthtool</entry>
+ <entry>
+ Get if device supports Wake On LAN
+ </entry>
+ </row>
+ <row>
+ <entry>GetEnabled</entry>
+ <entry>Bool</entry>
+ <entry></entry>
+ <entry>WakeOnLan.NoEthtool</entry>
+ <entry>
+ Get if Wake On LAN is enabled
+ </entry>
+ </row>
+ <row>
+ <entry>SetEnabled</entry>
+ <entry>Void</entry>
+ <entry>Bool</entry>
+ <entry>WakeOnLan.NoEthtool</entry>
+ <entry>
+ Enable or disable Wake On LAN
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+
+ <para>
+ This interface does not emit any signals.
+ </para>
+ </sect1>
+
<sect1 id="interface-device-laptop-panel">
<title>org.freedesktop.Hal.Device.LaptopPanel interface</title>
<para>
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/hal-0.5.10_git20071017/doc/spec/hal-spec-properties.xml new/hal-0.5.10_git20071120/doc/spec/hal-spec-properties.xml
--- old/hal-0.5.10_git20071017/doc/spec/hal-spec-properties.xml 2007-10-17 13:28:12.000000000 +0200
+++ new/hal-0.5.10_git20071120/doc/spec/hal-spec-properties.xml 2007-11-20 16:02:54.000000000 +0100
@@ -5030,7 +5030,7 @@
<entry>example: 1 (If the device only supports one sub-folder)</entry>
<entry>No</entry>
<entry>
- If portable_audio_player.access_method = "storage",
+ If portable_audio_player.access_method.protocols contains "storage",
this tells applications exactly how deep of directory hierarchies
files should be placed in. If all files are put in a
sub-folder (with the audio_folders property), only the depth within
@@ -5045,7 +5045,7 @@
<entry>example: music/ voice/ linein/</entry>
<entry>No</entry>
<entry>
- If portable_audio_player.access_method = "storage",
+ If portable_audio_player.access_method.protocols contains "storage",
this may contain a string list of folders in which music
can be found. Paths are relative to the mount point of the
device. If there is one or more entry in this property, the
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/hal-0.5.10_git20071017/doc/spec/hal-spec.xml.in new/hal-0.5.10_git20071120/doc/spec/hal-spec.xml.in
--- old/hal-0.5.10_git20071017/doc/spec/hal-spec.xml.in 2007-10-17 15:31:38.000000000 +0200
+++ new/hal-0.5.10_git20071120/doc/spec/hal-spec.xml.in 2007-11-20 17:25:48.000000000 +0100
@@ -3,8 +3,8 @@
<book id="index">
<bookinfo>
- <title>HAL 0.5.10_git20071017 Specification</title>
- <releaseinfo>Version 0.5.10_git20071017</releaseinfo>
+ <title>HAL 0.5.10_git20071120 Specification</title>
+ <releaseinfo>Version 0.5.10_git20071120</releaseinfo>
<date>March 24th, 2007</date> <!-- Update this manually -->
<authorgroup>
<author>
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/hal-0.5.10_git20071017/fdi/policy/10osvendor/30-wol.fdi new/hal-0.5.10_git20071120/fdi/policy/10osvendor/30-wol.fdi
--- old/hal-0.5.10_git20071017/fdi/policy/10osvendor/30-wol.fdi 1970-01-01 01:00:00.000000000 +0100
+++ new/hal-0.5.10_git20071120/fdi/policy/10osvendor/30-wol.fdi 2007-11-20 16:02:54.000000000 +0100
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deviceinfo version="0.2">
+
+ <device>
+ <match key="info.capabilities" contains="net.80203">
+ <append key="info.capabilities" type="strlist">wake_on_lan</append>
+ <append key="info.interfaces" type="strlist">org.freedesktop.Hal.Device.WakeOnLan</append>
+
+ <append key="org.freedesktop.Hal.Device.WakeOnLan.method_names" type="strlist">GetSupported</append>
+ <append key="org.freedesktop.Hal.Device.WakeOnLan.method_signatures" type="strlist"></append>
+ <append key="org.freedesktop.Hal.Device.WakeOnLan.method_argnames" type="strlist"></append>
+ <append key="org.freedesktop.Hal.Device.WakeOnLan.method_execpaths" type="strlist">hal-system-wol-supported</append>
+
+ <append key="org.freedesktop.Hal.Device.WakeOnLan.method_names" type="strlist">GetEnabled</append>
+ <append key="org.freedesktop.Hal.Device.WakeOnLan.method_signatures" type="strlist"></append>
+ <append key="org.freedesktop.Hal.Device.WakeOnLan.method_argnames" type="strlist"></append>
+ <append key="org.freedesktop.Hal.Device.WakeOnLan.method_execpaths" type="strlist">hal-system-wol-enabled</append>
+
+ <append key="org.freedesktop.Hal.Device.WakeOnLan.method_names" type="strlist">SetEnabled</append>
+ <append key="org.freedesktop.Hal.Device.WakeOnLan.method_signatures" type="strlist">b</append>
+ <append key="org.freedesktop.Hal.Device.WakeOnLan.method_argnames" type="strlist">enable</append>
+ <append key="org.freedesktop.Hal.Device.WakeOnLan.method_execpaths" type="strlist">hal-system-wol-enable</append>
+
+ </match>
+
+ </device>
+</deviceinfo>
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/hal-0.5.10_git20071017/fdi/policy/10osvendor/Makefile.am new/hal-0.5.10_git20071120/fdi/policy/10osvendor/Makefile.am
--- old/hal-0.5.10_git20071017/fdi/policy/10osvendor/Makefile.am 2007-10-17 13:28:12.000000000 +0200
+++ new/hal-0.5.10_git20071120/fdi/policy/10osvendor/Makefile.am 2007-11-20 16:02:54.000000000 +0100
@@ -8,7 +8,8 @@
10-rfkill-switch.fdi \
10-laptop-panel-mgmt-policy.fdi \
15-storage-luks.fdi \
- 20-storage-methods.fdi
+ 20-storage-methods.fdi \
+ 30-wol.fdi
if BUILD_KEYMAPS
dist_fdi_DATA += 10-keymap.fdi
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/hal-0.5.10_git20071017/hald/create_cache.c new/hal-0.5.10_git20071120/hald/create_cache.c
--- old/hal-0.5.10_git20071017/hald/create_cache.c 2007-10-17 13:28:12.000000000 +0200
+++ new/hal-0.5.10_git20071120/hald/create_cache.c 2007-11-20 16:02:54.000000000 +0100
@@ -142,7 +142,7 @@
if (strcmp (str, "contains_outof") == 0)
return MATCH_CONTAINS_OUTOF;
if (strcmp (str, "int_outof") == 0)
- return MATCH_CONTAINS_OUTOF;
+ return MATCH_INT_OUTOF;
if (strcmp (str, "prefix_outof") == 0)
return MATCH_PREFIX_OUTOF;
if (strcmp (str, "string_outof") == 0)
@@ -699,8 +699,9 @@
return num_skipped_fdi_files;
error:
HAL_ERROR (("Error generating fdi cache"));
- if (fd < 0)
+ if (fd >= 0)
close (fd);
+
unlink (cachename_temp);
return -1;
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/hal-0.5.10_git20071017/hald/linux/addons/addon-dell-backlight.cpp new/hal-0.5.10_git20071120/hald/linux/addons/addon-dell-backlight.cpp
--- old/hal-0.5.10_git20071017/hald/linux/addons/addon-dell-backlight.cpp 2007-10-17 13:28:12.000000000 +0200
+++ new/hal-0.5.10_git20071120/hald/linux/addons/addon-dell-backlight.cpp 2007-11-20 16:02:54.000000000 +0100
@@ -24,6 +24,7 @@
**************************************************************************/
#include
+#include
#include
#include
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/hal-0.5.10_git20071017/hald/linux/addons/addon-omap-backlight.c new/hal-0.5.10_git20071120/hald/linux/addons/addon-omap-backlight.c
--- old/hal-0.5.10_git20071017/hald/linux/addons/addon-omap-backlight.c 2007-10-17 13:28:12.000000000 +0200
+++ new/hal-0.5.10_git20071120/hald/linux/addons/addon-omap-backlight.c 2007-11-20 16:02:54.000000000 +0100
@@ -49,7 +49,7 @@
static GMainLoop *main_loop;
static LibHalContext *halctx = NULL;
-static char * udi;
+static char *udi;
static DBusConnection *conn;
#define NUM_BUF_LEN 11
@@ -58,25 +58,32 @@
struct backlight
{
- void (*set_backlight_level)(struct backlight * bl, int i);
- int (*get_backlight_level)(struct backlight * bl);
- void (*backlight_init)(struct backlight * bl);
- int bl_min;
- int bl_max;
+ void (*set_backlight_level) (struct backlight *bl, int i);
+ int (*get_backlight_level) (struct backlight *bl);
+ void (*backlight_init) (struct backlight *bl);
+ int bl_min;
+ int bl_max;
};
struct backlight bl_data;
/* Reads backligh level */
-static int read_backlight(struct backlight * bl)
+static int
+read_backlight (struct backlight * bl)
{
- int fd;
+ int fd, ret;
- fd = open("/sys/devices/platform/omapfb/panel/backlight_level", O_RDONLY);
- if(fd <0 || read(fd, buffer, NUM_BUF_LEN) < 0)
- return -1;
-
- return atoi(buffer);
+ fd = open ("/sys/devices/platform/omapfb/panel/backlight_level", O_RDONLY);
+ if (fd < 0)
+ return -1;
+
+ ret = read (fd, buffer, NUM_BUF_LEN)
+ close (fd);
+
+ if (ret >= 0)
+ return atoi (buffer);
+ else
+ return -1;
}
/* Read maximum bl level */
@@ -84,97 +91,100 @@
No we have fixed value in FDI file, but it
is better to set it in addon code.
*/
-static void backlight_init(struct backlight * bl)
+static void
+backlight_init (struct backlight * bl)
{
- int fd;
+ int fd, ret;
- /* Reading maximum backlight level */
- fd = open("/sys/devices/platform/omapfb/panel/backlight_max", O_RDONLY);
+ /* Reading maximum backlight level */
+ fd = open ("/sys/devices/platform/omapfb/panel/backlight_max", O_RDONLY);
+ if (fd < 0)
+ return;
- if(fd <0 || read(fd, buffer, NUM_BUF_LEN - 1) < 0)
- return;
+ ret = read(fd, buffer, NUM_BUF_LEN - 1);
+ close(fd);
- bl->bl_max = atoi(buffer);
- close(fd);
+ if (ret >= 0)
+ bl->bl_max = atoi (buffer);
}
/* Setting backlight level */
-static void write_backlight(struct backlight * bl, int level)
+static void
+write_backlight (struct backlight * bl, int level)
{
- int fd, l;
+ int fd, l, ret;
- /* sanity-checking level we're required to set */
- if(level > bl->bl_max)
- level = bl->bl_max;
+ /* sanity-checking level we're required to set */
+ if (level > bl->bl_max)
+ level = bl->bl_max;
- if(level < bl->bl_min)
- level = bl->bl_min;
+ if (level < bl->bl_min)
+ level = bl->bl_min;
- fd = open("/sys/devices/platform/omapfb/panel/backlight_level", O_WRONLY);
- l = snprintf(buffer, NUM_BUF_LEN - 1, "%d", level);
+ fd = open ("/sys/devices/platform/omapfb/panel/backlight_level", O_WRONLY);
+ if (fd < 0)
+ return;
- if(l >= (NUM_BUF_LEN - 1)) {
- close(fd);
- return;
- }
+ l = snprintf (buffer, NUM_BUF_LEN - 1, "%d", level);
- write(fd, buffer, l);
- close(fd);
+ if (l < (NUM_BUF_LEN - 1))
+ write (fd, buffer, l);
+
+ close (fd);
}
static gboolean
check_priv (DBusConnection *connection, DBusMessage *message, const char *udi, const char *privilege)
#ifdef HAVE_POLKIT
{
- gboolean ret;
- char *polkit_result;
- const char *invoked_by_syscon_name;
- DBusMessage *reply;
- DBusError error;
-
- ret = FALSE;
- polkit_result = NULL;
-
- invoked_by_syscon_name = dbus_message_get_sender (message);
-
- dbus_error_init (&error);
- polkit_result = libhal_device_is_caller_privileged (halctx,
- udi,
- privilege,
- invoked_by_syscon_name,
- &error);
- if (polkit_result == NULL) {
- reply = dbus_message_new_error_printf (message,
- "org.freedesktop.Hal.Device.Error",
- "Cannot determine if caller is privileged",
- privilege, polkit_result);
- dbus_connection_send (connection, reply, NULL);
- goto out;
- }
- if (strcmp (polkit_result, "yes") != 0) {
-
- reply = dbus_message_new_error_printf (message,
- "org.freedesktop.Hal.Device.PermissionDeniedByPolicy",
- "%s %s <-- (privilege, result)",
- privilege, polkit_result);
- dbus_connection_send (connection, reply, NULL);
- goto out;
- }
+ gboolean ret;
+ char *polkit_result;
+ const char *invoked_by_syscon_name;
+ DBusMessage *reply;
+ DBusError error;
- ret = TRUE;
+ ret = FALSE;
+ polkit_result = NULL;
+
+ invoked_by_syscon_name = dbus_message_get_sender (message);
+
+ dbus_error_init (&error);
+ polkit_result = libhal_device_is_caller_privileged (halctx,
+ udi,
+ privilege,
+ invoked_by_syscon_name,
+ &error);
+ if (polkit_result == NULL) {
+ reply = dbus_message_new_error_printf (message,
+ "org.freedesktop.Hal.Device.Error",
+ "Cannot determine if caller is privileged",
+ privilege, polkit_result);
+ dbus_connection_send (connection, reply, NULL);
+ goto out;
+ }
+
+ if (strcmp (polkit_result, "yes") != 0) {
+ reply = dbus_message_new_error_printf (message,
+ "org.freedesktop.Hal.Device.PermissionDeniedByPolicy",
+ "%s %s <-- (privilege, result)",
+ privilege, polkit_result);
+ dbus_connection_send (connection, reply, NULL);
+ goto out;
+ }
+
+ ret = TRUE;
out:
- if (polkit_result != NULL)
- libhal_free_string (polkit_result);
- return ret;
+ if (polkit_result != NULL)
+ libhal_free_string (polkit_result);
+ return ret;
}
#else
{
- return TRUE;
+ return TRUE;
}
#endif
-
/* DBus filter function */
static DBusHandlerResult
filter_function (DBusConnection *connection, DBusMessage *message, void *userdata)
@@ -182,27 +192,28 @@
DBusError err;
DBusMessage *reply;
- if (!check_priv (connection, message, dbus_message_get_path (message), "org.freedesktop.hal.power-management.lcd-panel")) {
- return DBUS_HANDLER_RESULT_HANDLED;
- }
+ if (!check_priv (connection, message, dbus_message_get_path (message),
+ "org.freedesktop.hal.power-management.lcd-panel")) {
+ return DBUS_HANDLER_RESULT_HANDLED;
+ }
#ifdef DEBUG_OMAP_BL
- dbg ("filter_function: sender=%s destination=%s obj_path=%s interface=%s method=%s",
- dbus_message_get_sender (message),
- dbus_message_get_destination (message),
- dbus_message_get_path (message),
+ dbg ("filter_function: sender=%s destination=%s obj_path=%s interface=%s method=%s",
+ dbus_message_get_sender (message),
+ dbus_message_get_destination (message),
+ dbus_message_get_path (message),
dbus_message_get_interface (message),
dbus_message_get_member (message));
#endif
reply = NULL;
- if (dbus_message_is_method_call (message,
- "org.freedesktop.Hal.Device.LaptopPanel",
+ if (dbus_message_is_method_call (message,
+ "org.freedesktop.Hal.Device.LaptopPanel",
"SetBrightness")) {
int brightness;
dbus_error_init (&err);
- if (dbus_message_get_args (message,
+ if (dbus_message_get_args (message,
&err,
DBUS_TYPE_INT32, &brightness,
DBUS_TYPE_INVALID)) {
@@ -210,7 +221,6 @@
reply = dbus_message_new_error (message,
"org.freedesktop.Hal.Device.LaptopPanel.Invalid",
"Brightness has to be between 0 and 228!");
-
} else {
int return_code;
@@ -228,14 +238,13 @@
dbus_connection_send (connection, reply, NULL);
}
-
- } else if (dbus_message_is_method_call (message,
- "org.freedesktop.Hal.Device.LaptopPanel",
+ } else if (dbus_message_is_method_call (message,
+ "org.freedesktop.Hal.Device.LaptopPanel",
"GetBrightness")) {
int brightness;
dbus_error_init (&err);
- if (dbus_message_get_args (message,
+ if (dbus_message_get_args (message,
&err,
DBUS_TYPE_INVALID)) {
@@ -256,9 +265,8 @@
DBUS_TYPE_INVALID);
dbus_connection_send (connection, reply, NULL);
}
-
}
-
+
error:
if (reply != NULL)
dbus_message_unref (reply);
@@ -267,12 +275,13 @@
}
/* Setting-up backlight structure */
-static void setup_cb(void)
+static void
+setup_cb (void)
{
- memset(&bl_data, 0, sizeof(struct backlight));
- bl_data.backlight_init = backlight_init;
- bl_data.get_backlight_level = read_backlight;
- bl_data.set_backlight_level = write_backlight;
+ memset (&bl_data, 0, sizeof (struct backlight));
+ bl_data.backlight_init = backlight_init;
+ bl_data.get_backlight_level = read_backlight;
+ bl_data.set_backlight_level = write_backlight;
}
int
@@ -281,7 +290,7 @@
DBusError err;
setup_logger ();
- setup_cb();
+ setup_cb ();
udi = getenv ("UDI");
HAL_DEBUG (("udi=%s", udi));
@@ -296,16 +305,14 @@
return -3;
}
-
-
conn = libhal_ctx_get_dbus_connection (halctx);
dbus_connection_setup_with_g_main (conn, NULL);
dbus_connection_add_filter (conn, filter_function, NULL, NULL);
- if (!libhal_device_claim_interface (halctx,
- "/org/freedesktop/Hal/devices/omapfb_bl",
- "org.freedesktop.Hal.Device.LaptopPanel",
+ if (!libhal_device_claim_interface (halctx,
+ "/org/freedesktop/Hal/devices/omapfb_bl",
+ "org.freedesktop.Hal.Device.LaptopPanel",
" \n"
" \n"
" \n"
@@ -317,11 +324,13 @@
HAL_ERROR (("Cannot claim interface 'org.freedesktop.Hal.Device.LaptopPanel'"));
return -4;
}
+
dbus_error_init (&err);
if (!libhal_device_addon_is_ready (halctx, udi, &err)) {
return -4;
}
- bl_data.backlight_init(&bl_data);
+
+ bl_data.backlight_init (&bl_data);
main_loop = g_main_loop_new (NULL, FALSE);
g_main_loop_run (main_loop);
return 0;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/hal-0.5.10_git20071017/hald/linux/osspec.c new/hal-0.5.10_git20071120/hald/linux/osspec.c
--- old/hal-0.5.10_git20071017/hald/linux/osspec.c 2007-10-17 13:28:12.000000000 +0200
+++ new/hal-0.5.10_git20071120/hald/linux/osspec.c 2007-11-20 16:02:54.000000000 +0100
@@ -493,7 +493,7 @@
* TODO: figure out WTF the mapping should be; "Lunch Box"? Give me a break :-)
*/
static const char *chassis_map[] = {
- "Other", "unknown",
+ "Other", "unknown", /* 0x01 */
"Unknown", "unknown",
"Desktop", "desktop",
"Low Profile Desktop", "desktop",
@@ -518,6 +518,8 @@
"Rack Mount Chassis", "unknown",
"Sealed-case PC", "unknown",
"Multi-system", "unknown",
+ "CompactPCI", "unknonw",
+ "AdvancedTCA", "unknown", /* 0x1B */
NULL
};
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/hal-0.5.10_git20071017/hald/linux/probing/probe-net-bluetooth.c new/hal-0.5.10_git20071120/hald/linux/probing/probe-net-bluetooth.c
--- old/hal-0.5.10_git20071017/hald/linux/probing/probe-net-bluetooth.c 2007-10-17 13:28:12.000000000 +0200
+++ new/hal-0.5.10_git20071120/hald/linux/probing/probe-net-bluetooth.c 2007-11-20 16:02:54.000000000 +0100
@@ -41,8 +41,8 @@
#define BLUEZ_NET_SERVER_IFACE "org.bluez.network.Server"
static void
-get_properties (DBusConnection *conn, LibHalContext *ctx, const char *udi,
- const char *id, const char *path)
+get_properties (DBusConnection *conn, LibHalChangeSet *cs,
+ const char *id, const char *path)
{
DBusMessage *msg;
DBusMessage *reply = NULL;
@@ -100,7 +100,7 @@
HAL_INFO (("reply: %s:%s", key, value));
- libhal_device_set_property_string (ctx, udi, prop, value, &error);
+ libhal_changeset_set_property_string (cs, prop, value);
break;
}
case DBUS_TYPE_INT32:
@@ -111,7 +111,7 @@
HAL_INFO (("reply: %s:%d", key, value));
- libhal_device_set_property_int (ctx, udi, prop, value, &error);
+ libhal_changeset_set_property_int (cs, prop, value);
break;
}
default:
@@ -138,6 +138,7 @@
char network[8] = "network";
const char *pnetwork = network;
LibHalContext *ctx = NULL;
+ LibHalChangeSet *cs = NULL;
DBusConnection *conn;
DBusMessage *msg = NULL;
DBusMessage *reply = NULL;
@@ -147,16 +148,13 @@
if (udi == NULL)
goto out;
- dbus_error_init (&error);
- if ((ctx = libhal_ctx_init_direct (&error)) == NULL)
+ iface = getenv ("HAL_PROP_NET_INTERFACE");
+ if (iface == NULL)
goto out;
- iface = libhal_device_get_property_string (ctx, udi, "net.interface", NULL);
-
HAL_INFO (("Investigating '%s'", iface));
- if (iface == NULL)
- goto out;
+ dbus_error_init (&error);
if ((conn = dbus_bus_get (DBUS_BUS_SYSTEM, &error)) == NULL)
goto out;
@@ -216,13 +214,28 @@
goto out;
}
- get_properties (conn, ctx, udi, id, connection);
+ ctx = libhal_ctx_init_direct (&error);
+ if (ctx == NULL)
+ goto out;
+
+ cs = libhal_device_new_changeset (udi);
+ if (cs == NULL) {
+ HAL_ERROR(("Cannot initialize changeset"));
+ goto out;
+ }
+
+ get_properties (conn, cs, id, connection);
out:
if (msg)
dbus_message_unref (msg);
if (reply)
dbus_message_unref (reply);
+ if (cs != NULL) {
+ dbus_error_init (&error);
+ libhal_device_commit_changeset (ctx, cs, &error);
+ libhal_device_free_changeset (cs);
+ }
if (ctx != NULL) {
dbus_error_init (&error);
libhal_ctx_shutdown (ctx, &error);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/hal-0.5.10_git20071017/hald/linux/probing/probe-smbios.c new/hal-0.5.10_git20071120/hald/linux/probing/probe-smbios.c
--- old/hal-0.5.10_git20071017/hald/linux/probing/probe-smbios.c 2007-10-17 13:28:12.000000000 +0200
+++ new/hal-0.5.10_git20071120/hald/linux/probing/probe-smbios.c 2007-11-20 16:02:54.000000000 +0100
@@ -205,7 +205,7 @@
/* read the output of the child */
while(fgets (buf, sizeof(buf), f) != NULL)
{
- unsigned int i;
+ int i;
unsigned int len;
unsigned int tabs = 0;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/hal-0.5.10_git20071017/hald/util.h new/hal-0.5.10_git20071120/hald/util.h
--- old/hal-0.5.10_git20071017/hald/util.h 2007-10-17 13:28:12.000000000 +0200
+++ new/hal-0.5.10_git20071120/hald/util.h 2007-11-20 16:02:54.000000000 +0100
@@ -39,7 +39,6 @@
#define HAL_NAME_MAX 256
#define HAL_PATH_MAX 512
-#define HAL_HELPER_TIMEOUT 10000
gboolean hal_util_remove_trailing_slash (gchar *path);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/hal-0.5.10_git20071017/libhal/libhal.c new/hal-0.5.10_git20071120/libhal/libhal.c
--- old/hal-0.5.10_git20071017/libhal/libhal.c 2007-10-17 13:28:12.000000000 +0200
+++ new/hal-0.5.10_git20071120/libhal/libhal.c 2007-11-20 16:02:54.000000000 +0100
@@ -2279,6 +2279,8 @@
if (reason_why_locked != NULL) {
*reason_why_locked =
dbus_malloc0 (strlen (error->message) + 1);
+ if (*reason_why_locked == NULL)
+ return FALSE;
strcpy (*reason_why_locked, error->message);
}
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/hal-0.5.10_git20071017/partutil/partutil.c new/hal-0.5.10_git20071120/partutil/partutil.c
--- old/hal-0.5.10_git20071017/partutil/partutil.c 2007-10-17 13:28:12.000000000 +0200
+++ new/hal-0.5.10_git20071120/partutil/partutil.c 2007-11-20 16:02:54.000000000 +0100
@@ -928,11 +928,13 @@
part_table_entry_get_type (PartitionTable *p, int entry)
{
char *s = NULL;
- PartitionEntry *pe = g_slist_nth_data (p->entries, entry);
+ PartitionEntry *pe;
if (p == NULL)
goto out;
+ pe = g_slist_nth_data (p->entries, entry);
+
switch (p->scheme) {
case PART_TYPE_GPT:
s = get_le_guid (&(pe->data[0]));
@@ -959,11 +961,13 @@
part_table_entry_get_uuid (PartitionTable *p, int entry)
{
char *s = NULL;
- PartitionEntry *pe = g_slist_nth_data (p->entries, entry);
+ PartitionEntry *pe;
if (p == NULL)
goto out;
+ pe = g_slist_nth_data (p->entries, entry);
+
switch (p->scheme) {
case PART_TYPE_GPT:
s = get_le_guid (&(pe->data[16]));
@@ -982,11 +986,13 @@
part_table_entry_get_label (PartitionTable *p, int entry)
{
char *s = NULL;
- PartitionEntry *pe = g_slist_nth_data (p->entries, entry);
+ PartitionEntry *pe;
if (p == NULL)
goto out;
+ pe = g_slist_nth_data (p->entries, entry);
+
switch (p->scheme) {
case PART_TYPE_GPT:
s = g_utf16_to_utf8 ((const gunichar2 *) &(pe->data[56]), 36, NULL, NULL, NULL);
@@ -1012,11 +1018,13 @@
char **ss = NULL;
guint32 apm_status;
guint64 gpt_attributes;
- PartitionEntry *pe = g_slist_nth_data (p->entries, entry);
+ PartitionEntry *pe;
if (p == NULL)
goto out;
+ pe = g_slist_nth_data (p->entries, entry);
+
ss = g_new0 (char*, 6 + 1); /* hard coded to max items we'll return */
ss[0] = NULL;
n = 0;
@@ -1087,12 +1095,14 @@
part_table_entry_get_offset (PartitionTable *p, int entry)
{
guint64 val;
- PartitionEntry *pe = g_slist_nth_data (p->entries, entry);
+ PartitionEntry *pe;
val = G_MAXUINT64;
if (p == NULL)
goto out;
+ pe = g_slist_nth_data (p->entries, entry);
+
switch (p->scheme) {
case PART_TYPE_GPT:
val = 0x200 * ((guint64) get_le64 (pe->data + 32));
@@ -1122,12 +1132,14 @@
part_table_entry_get_size (PartitionTable *p, int entry)
{
guint64 val;
- PartitionEntry *pe = g_slist_nth_data (p->entries, entry);
+ PartitionEntry *pe;
val = G_MAXUINT64;
if (p == NULL)
goto out;
+ pe = g_slist_nth_data (p->entries, entry);
+
switch (p->scheme) {
case PART_TYPE_GPT:
val = 0x200 * (((guint64) get_le64 (pe->data + 40)) - ((guint64) get_le64 (pe->data + 32)) + 1);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/hal-0.5.10_git20071017/policy/hal-wol.policy new/hal-0.5.10_git20071120/policy/hal-wol.policy
--- old/hal-0.5.10_git20071017/policy/hal-wol.policy 1970-01-01 01:00:00.000000000 +0100
+++ new/hal-0.5.10_git20071120/policy/hal-wol.policy 2007-11-20 16:02:54.000000000 +0100
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE policyconfig PUBLIC
+ "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
+ "http://www.freedesktop.org/standards/PolicyKit/1.0/policyconfig.dtd">
+
+<policyconfig>
+
+ <action id="org.freedesktop.hal.wol.enabled">
+ <description>If Wake on LAN is enabled</description>
+ <message>System policy prevents checking if Wake on LAN is enabled</message>
+ <defaults>
+ no
+ yes
+ </defaults>
+ </action>
+
+ <action id="org.freedesktop.hal.wol.enable">
+ <description>Enable or disable Wake on LAN</description>
+ <message>System policy prevents enabling or disabling Wake on LAN</message>
+ <defaults>
+ no
+ yes
+ </defaults>
+ </action>
+
+ <action id="org.freedesktop.hal.wol.supported">
+ <description>If Wake on LAN is supported</description>
+ <message>System policy prevents checking if Wake on LAN is supported</message>
+ <defaults>
+ no
+ yes
+ </defaults>
+ </action>
+
+</policyconfig>
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/hal-0.5.10_git20071017/policy/Makefile.am new/hal-0.5.10_git20071120/policy/Makefile.am
--- old/hal-0.5.10_git20071017/policy/Makefile.am 2007-10-17 13:28:12.000000000 +0200
+++ new/hal-0.5.10_git20071120/policy/Makefile.am 2007-11-20 16:02:54.000000000 +0100
@@ -6,7 +6,8 @@
hal-lock.policy \
hal-storage.policy \
hal-power.policy \
- hal-killswitch.policy
+ hal-killswitch.policy \
+ hal-wol.policy
if HAVE_ACLMGMT
dist_polkit_policy_DATA += hal-device-file.policy
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/hal-0.5.10_git20071017/tools/hal-disable-polling.c new/hal-0.5.10_git20071120/tools/hal-disable-polling.c
--- old/hal-0.5.10_git20071017/tools/hal-disable-polling.c 2007-10-17 13:28:12.000000000 +0200
+++ new/hal-0.5.10_git20071120/tools/hal-disable-polling.c 2007-11-20 16:02:54.000000000 +0100
@@ -29,6 +29,8 @@
#endif
#include
+#include
+#include
#include
#include
#include
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/hal-0.5.10_git20071017/tools/hal-system-wol-enable new/hal-0.5.10_git20071120/tools/hal-system-wol-enable
--- old/hal-0.5.10_git20071017/tools/hal-system-wol-enable 1970-01-01 01:00:00.000000000 +0100
+++ new/hal-0.5.10_git20071120/tools/hal-system-wol-enable 2007-11-20 16:02:54.000000000 +0100
@@ -0,0 +1,24 @@
+#!/bin/bash
+#
+# Copyright (C) 2007 Holger Macht
+#
+# Author: Holger Macht
+#
+# This file is released under the GPLv2.
+#
+
+. hal-functions
+
+if [ -z "$UDI" -o -z "$HAL_PROP_NET_INTERFACE" ]; then
+ echo "org.freedesktop.Hal.Device.WakeOnLAN.UnknownError" >&2
+ echo "Missing or empty environment variable(s)." >&2
+ echo "This script should be started by hald." >&2
+ exit 1
+fi
+
+# read value for setting enabled or disabled
+read enable
+export enable
+
+hal_check_priv org.freedesktop.hal.wol.enable
+hal_exec_backend
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/hal-0.5.10_git20071017/tools/hal-system-wol-enabled new/hal-0.5.10_git20071120/tools/hal-system-wol-enabled
--- old/hal-0.5.10_git20071017/tools/hal-system-wol-enabled 1970-01-01 01:00:00.000000000 +0100
+++ new/hal-0.5.10_git20071120/tools/hal-system-wol-enabled 2007-11-20 16:02:54.000000000 +0100
@@ -0,0 +1,20 @@
+#!/bin/bash
+#
+# Copyright (C) 2007 Holger Macht
+#
+# Author: Holger Macht
+#
+# This file is released under the GPLv2.
+#
+
+. hal-functions
+
+if [ -z "$UDI" -o -z "$HAL_PROP_NET_INTERFACE" ]; then
+ echo "org.freedesktop.Hal.Device.WakeOnLAN.UnknownError" >&2
+ echo "Missing or empty environment variable(s)." >&2
+ echo "This script should be started by hald." >&2
+ exit 1
+fi
+
+hal_check_priv org.freedesktop.hal.wol.enabled
+hal_exec_backend
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/hal-0.5.10_git20071017/tools/hal-system-wol-supported new/hal-0.5.10_git20071120/tools/hal-system-wol-supported
--- old/hal-0.5.10_git20071017/tools/hal-system-wol-supported 1970-01-01 01:00:00.000000000 +0100
+++ new/hal-0.5.10_git20071120/tools/hal-system-wol-supported 2007-11-20 16:02:54.000000000 +0100
@@ -0,0 +1,20 @@
+#!/bin/bash
+#
+# Copyright (C) 2007 Holger Macht
+#
+# Author: Holger Macht
+#
+# This file is released under the GPLv2.
+#
+
+. hal-functions
+
+if [ -z "$UDI" -o -z "$HAL_PROP_NET_INTERFACE" ]; then
+ echo "org.freedesktop.Hal.Device.WakeOnLAN.UnknownError" >&2
+ echo "Missing or empty environment variable(s)." >&2
+ echo "This script should be started by hald." >&2
+ exit 1
+fi
+
+hal_check_priv org.freedesktop.hal.wol.supported
+hal_exec_backend
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/hal-0.5.10_git20071017/tools/linux/hal-system-killswitch-get-power-linux new/hal-0.5.10_git20071120/tools/linux/hal-system-killswitch-get-power-linux
--- old/hal-0.5.10_git20071017/tools/linux/hal-system-killswitch-get-power-linux 2007-10-17 13:28:12.000000000 +0200
+++ new/hal-0.5.10_git20071120/tools/linux/hal-system-killswitch-get-power-linux 2007-11-20 16:02:54.000000000 +0100
@@ -8,6 +8,13 @@
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
+if [ "$HAL_PROP_KILLSWITCH_ACCESS_METHOD" = "dell" ]; then
+ DELL_WCTL=/usr/bin/dellWirelessCtl
+ if [ -x /usr/sbin/dellWirelessCtl ]; then
+ DELL_WCTL=/usr/sbin/dellWirelessCtl
+ fi
+fi
+
if [ "$HAL_PROP_KILLSWITCH_TYPE" = "bluetooth" ]; then
if [ "$HAL_PROP_KILLSWITCH_ACCESS_METHOD" = "sonypic" ]; then
value="`hal-system-sonypic getbluetooth`"
@@ -17,9 +24,9 @@
exit 1
fi
exit ${value}
- elif [ "$HAL_PROP_KILLSWITCH_ACCESS_METHOD" = "dell" -a -x /usr/bin/dellWirelessCtl ]; then
+ elif [ "$HAL_PROP_KILLSWITCH_ACCESS_METHOD" = "dell" -a -x $DELL_WCTL ]; then
# TODO: write our own binary that links with libsmbios?
- /usr/bin/dellWirelessCtl --st_bt
+ $DELL_WCTL --st_bt
value=$?
if [ "$value" = "0" ]; then
exit 1
@@ -35,9 +42,9 @@
exit 1
fi
elif [ "$HAL_PROP_KILLSWITCH_TYPE" = "wlan" ]; then
- if [ "$HAL_PROP_KILLSWITCH_ACCESS_METHOD" = "dell" -a -x /usr/bin/dellWirelessCtl ]; then
+ if [ "$HAL_PROP_KILLSWITCH_ACCESS_METHOD" = "dell" -a -x $DELL_WCTL ]; then
# TODO: write our own binary that links with libsmbios?
- /usr/bin/dellWirelessCtl --st_wlan
+ $DELL_WCTL --st_wlan
value=$?
if [ "$value" = "0" ]; then
exit 1
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/hal-0.5.10_git20071017/tools/linux/hal-system-killswitch-set-power-linux new/hal-0.5.10_git20071120/tools/linux/hal-system-killswitch-set-power-linux
--- old/hal-0.5.10_git20071017/tools/linux/hal-system-killswitch-set-power-linux 2007-10-17 13:28:12.000000000 +0200
+++ new/hal-0.5.10_git20071120/tools/linux/hal-system-killswitch-set-power-linux 2007-11-20 16:02:54.000000000 +0100
@@ -8,6 +8,13 @@
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
+if [ "$HAL_PROP_KILLSWITCH_ACCESS_METHOD" = "dell" ]; then
+ DELL_WCTL=/usr/bin/dellWirelessCtl
+ if [ -x /usr/sbin/dellWirelessCtl ]; then
+ DELL_WCTL=/usr/sbin/dellWirelessCtl
+ fi
+fi
+
if [ "$HAL_PROP_KILLSWITCH_TYPE" = "bluetooth" ]; then
if [ "$HAL_PROP_KILLSWITCH_ACCESS_METHOD" = "sonypic" ]; then
hal-system-sonypic setbluetooth $value
@@ -16,16 +23,16 @@
exit 1
fi
exit 0
- elif [ "$HAL_PROP_KILLSWITCH_ACCESS_METHOD" = "dell" -a -x /usr/bin/dellWirelessCtl ]; then
+ elif [ "$HAL_PROP_KILLSWITCH_ACCESS_METHOD" = "dell" -a -x $DELL_WCTL ]; then
# As a side effect we disable the physical kill switch
# TODO: write our own binary that links with libsmbios?
if [ "$value" = "true" ]; then
- /usr/bin/dellWirelessCtl --sw_bt 0 --bt 1
+ $DELL_WCTL --sw_bt 0 --bt 1
ret=$?
else
- /usr/bin/dellWirelessCtl --sw_bt 0 --bt 0
+ $DELL_WCTL --sw_bt 0 --bt 0
ret=$?
fi
if [ "$ret" != "0" ]; then
@@ -38,16 +45,16 @@
exit 1
fi
elif [ "$HAL_PROP_KILLSWITCH_TYPE" = "wlan" ]; then
- if [ "$HAL_PROP_KILLSWITCH_ACCESS_METHOD" = "dell" -a -x /usr/bin/dellWirelessCtl ]; then
+ if [ "$HAL_PROP_KILLSWITCH_ACCESS_METHOD" = "dell" -a -x $DELL_WCTL ]; then
# As a side effect we disable the physical kill switch
# TODO: write our own binary that links with libsmbios?
if [ "$value" = "true" ]; then
- /usr/bin/dellWirelessCtl --sw_wlan 0 --wlan 1
+ $DELL_WCTL --sw_wlan 0 --wlan 1
ret=$?
else
- /usr/bin/dellWirelessCtl --sw_wlan 0 --wlan 0
+ $DELL_WCTL --sw_wlan 0 --wlan 0
ret=$?
fi
if [ "$ret" != "0" ]; then
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/hal-0.5.10_git20071017/tools/linux/hal-system-wol-linux new/hal-0.5.10_git20071120/tools/linux/hal-system-wol-linux
--- old/hal-0.5.10_git20071017/tools/linux/hal-system-wol-linux 1970-01-01 01:00:00.000000000 +0100
+++ new/hal-0.5.10_git20071120/tools/linux/hal-system-wol-linux 2007-11-20 16:02:54.000000000 +0100
@@ -0,0 +1,81 @@
+#!/bin/bash
+#
+# Copyright (C) 2007 Holger Macht
+#
+# Author: Holger Macht
+#
+# This file is released under the GPLv2.
+#
+
+SUPPORT_FLAGS=
+IFACE="$HAL_PROP_NET_INTERFACE"
+
+wol_get_flags() {
+ SUPPORT_FLAGS=`ethtool $IFACE | awk '/Supports Wake-on:/{if ($3 ~ /g/) print $3 }'`
+ [ -n "$SUPPORT_FLAGS" ] && return 0
+ echo "org.freedesktop.Hal.Device.WakeOnLAN.NotSupported"
+ exit 1
+}
+
+wol_supported() {
+ wol_get_flags
+ [ -n "$SUPPORT_FLAGS" ] && return 0
+ return 1
+}
+
+wol_enabled() {
+ ENABLED=`ethtool $IFACE | awk '/[^s ]Wake-on:/{if ($2 ~ /g/) print $2 }'`
+ [ -n "$ENABLED" ] && return 0
+ return 1
+}
+
+wol_enable() {
+ wol_get_flags
+
+ if [ -z "$SUPPORT_FLAGS" ]; then
+ echo "No support flags set, using default: g"
+ SUPPORT_FLAGS=g
+ fi
+
+ ethtool -s $IFACE wol $SUPPORT_FLAGS
+ if [ "$?" != "0" ]; then
+ echo "error enabling wake on LAN for interface $IFACE"
+ return 1
+ fi
+}
+
+wol_disable() {
+ ethtool -s $IFACE wol d
+ if [ "$?" != "0" ]; then
+ echo "error disabling wake on LAN for interface $IFACE"
+ return 1
+ fi
+}
+
+which ethtool >/dev/null 2>&1
+if [ "$?" != "0" ]; then
+ echo "org.freedesktop.Hal.Device.WakeOnLan.NoEthtool"
+ exit 1
+fi
+
+case "`basename $0`" in
+ hal-system-wol-supported-linux)
+ wol_supported
+ ;;
+ hal-system-wol-enabled-linux)
+ wol_enabled
+ ;;
+ hal-system-wol-enable-linux)
+ if [ "$enable" = "true" ]; then
+ wol_enable
+ elif [ "$enable" = "false" ]; then
+ wol_disable
+ else
+ echo "org.freedesktop.Hal.Device.WakeOnLAN.InvalidArgument"
+ exit 1
+ fi
+ ;;
+ *) ;;
+esac
+
+exit $?
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/hal-0.5.10_git20071017/tools/linux/Makefile.am new/hal-0.5.10_git20071120/tools/linux/Makefile.am
--- old/hal-0.5.10_git20071017/tools/linux/Makefile.am 2007-10-17 13:28:12.000000000 +0200
+++ new/hal-0.5.10_git20071120/tools/linux/Makefile.am 2007-11-20 16:02:54.000000000 +0100
@@ -37,7 +37,8 @@
hal-system-lcd-set-brightness-linux \
hal-system-power-set-power-save-linux \
hal-system-killswitch-get-power-linux \
- hal-system-killswitch-set-power-linux
+ hal-system-killswitch-set-power-linux \
+ hal-system-wol-linux
EXTRA_DIST = 90-hal.rules $(script_SCRIPTS)
@@ -58,3 +59,11 @@
clean-local :
rm -f *~
+
+install-data-hook:
+ ln -sf hal-system-wol-linux $(DESTDIR)$(scriptdir)/hal-system-wol-enable-linux
+ ln -sf hal-system-wol-linux $(DESTDIR)$(scriptdir)/hal-system-wol-enabled-linux
+ ln -sf hal-system-wol-linux $(DESTDIR)$(scriptdir)/hal-system-wol-supported-linux
+
+uninstall-hook:
+ rm -f $(DESTDIR)$(scriptdir)/hal-system-wol-*
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/hal-0.5.10_git20071017/tools/Makefile.am new/hal-0.5.10_git20071120/tools/Makefile.am
--- old/hal-0.5.10_git20071017/tools/Makefile.am 2007-10-17 13:28:12.000000000 +0200
+++ new/hal-0.5.10_git20071120/tools/Makefile.am 2007-11-20 16:02:54.000000000 +0100
@@ -167,6 +167,9 @@
hal-system-power-set-power-save \
hal-system-killswitch-get-power \
hal-system-killswitch-set-power \
+ hal-system-wol-supported \
+ hal-system-wol-enabled \
+ hal-system-wol-enable \
hal-functions
EXTRA_DIST=$(man_MANS) $(MAN_IN_FILES) gen-libgphoto-hal-fdi $(script_SCRIPTS)
++++++ hal-acpi_high_rate_calculate_on_time.diff ++++++
diff --git a/hald/device_pm.c b/hald/device_pm.c
index e84c4ff..4d12423 100644
--- a/hald/device_pm.c
+++ b/hald/device_pm.c
@@ -189,6 +189,28 @@ void
device_pm_calculate_time (HalDevice *d)
{
int time;
+ gboolean calculate_per_time;
+
+ calculate_per_time = hal_device_property_get_bool (d, "battery.remaining_time.calculate_per_time");
+
+ /* check if we may need to calculate the remaining time because of special cases */
+ if (!calculate_per_time) {
+ const char *type;
+ const char *unit;
+
+ type = hal_device_property_get_string(d, "battery.type");
+ if ((type != NULL) && (strcmp(type, "primary") == 0)) {
+ /* be a littlebit paranoid */
+ unit = hal_device_property_get_string(d, "battery.charge_level.unit");
+ if ((unit != NULL) && (strcmp(type, "mWh") == 0)) {
+ /* check if the rate is higher than 40 Watt, this should be wrong
+ better calculate the time based on time */
+ if (hal_device_property_get_int (d, "battery.charge_level.rate") > 40000) {
+ calculate_per_time = TRUE;
+ }
+ }
+ }
+ }
time = util_compute_time_remaining (
hal_device_get_udi (d),
@@ -197,7 +219,7 @@ device_pm_calculate_time (HalDevice *d)
hal_device_property_get_int (d, "battery.charge_level.last_full"),
hal_device_property_get_bool (d, "battery.rechargeable.is_discharging"),
hal_device_property_get_bool (d, "battery.rechargeable.is_charging"),
- hal_device_property_get_bool (d, "battery.remaining_time.calculate_per_time"));
+ calculate_per_time);
/* zero time is unknown */
if (time > 0)
++++++ hal-add-drm_subsystem.diff ++++++
diff --git a/doc/spec/hal-spec-properties.xml b/doc/spec/hal-spec-properties.xml
index 4234e8d..75cad45 100644
--- a/doc/spec/hal-spec-properties.xml
+++ b/doc/spec/hal-spec-properties.xml
@@ -2747,6 +2747,39 @@ org.freedesktop.Hal.Device.Volume.method_signatures = {'ssas', 'as', 'as'}
</informaltable>
</sect2>
+ <sect2 id="device-properties-drm">
+ <title>drm namespace</title>
+ <para>
+ The <literal>drm</literal> namespace is present for Direct Rendering Manager device objects.
+ They represent a Direct Rendering Interface.
+ </para>
+ <informaltable>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Key (type)</entry>
+ <entry>Values</entry>
+ <entry>Mandatory</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry><literal>drm.dri_library</literal> (string)</entry>
+ <entry></entry>
+ <entry>Yes</entry>
+ <entry>Name of the dri (Direct Rendering Interface) library (e.g. i915).</entry>
+ </row>
+ <row>
+ <entry><literal>drm.version</literal> (string)</entry>
+ <entry></entry>
+ <entry>Yes</entry>
+ <entry>The drm version (of the kernel module/diver).</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </sect2>
</sect1>
<sect1 id="properties-functional">
diff --git a/hald/linux/device.c b/hald/linux/device.c
index 8cc12ef..f9d38cb 100644
--- a/hald/linux/device.c
+++ b/hald/linux/device.c
@@ -3297,6 +3297,61 @@ power_supply_compute_udi (HalDevice *d)
/*--------------------------------------------------------------------------------------------------------------*/
static HalDevice *
+drm_add (const gchar *sysfs_path, const gchar *device_file, HalDevice *parent_dev, const gchar *parent_path)
+{
+ HalDevice *d = NULL;
+
+ d = hal_device_new ();
+
+ hal_device_add_capability (d, "drm");
+
+ if (parent_dev != NULL) {
+ hal_device_property_set_string (d, "info.parent", hal_device_get_udi (parent_dev));
+ hal_device_copy_property( parent_dev, "info.vendor", d, "info.vendor");
+ } else {
+ hal_device_property_set_string (d, "info.parent", "/org/freedesktop/Hal/devices/computer");
+ }
+
+ hal_device_property_set_string (d, "info.product", "Direct Rendering Manager Device");
+ hal_device_property_set_string (d, "info.category", "drm");
+ hal_device_property_set_string (d, "linux.device_file", device_file);
+ hal_device_property_set_string (d, "linux.subsystem", "drm");
+ hal_device_property_set_string (d, "linux.sysfs_path", sysfs_path);
+
+ hal_util_set_driver (d, "info.linux.driver", sysfs_path); /* not sure if this is needed/set */
+ hal_util_set_string_from_file (d, "drm.dri_library", sysfs_path, "dri_library_name");
+ hal_util_set_string_from_file (d, "drm.version", sysfs_path, "../version");
+
+ return d;
+}
+
+static gboolean
+drm_compute_udi (HalDevice *d)
+{
+ gchar udi[256];
+ const char *dir;
+ const char *name;
+
+ dir = hal_device_property_get_string (d, "linux.sysfs_path");
+
+ name = hal_util_get_last_element(dir);
+
+ /* generate e.g.: /org/freedesktop/Hal/devices/pci_8086_2a02_drm_i915_card0 */
+ hal_util_compute_udi (hald_get_gdl (), udi, sizeof (udi),
+ "%s_drm_%s_%s",
+ hal_device_property_get_string (d, "info.parent"),
+ hal_device_property_get_string (d, "drm.dri_library"),
+ name);
+
+ hal_device_set_udi (d, udi);
+ hal_device_property_set_string (d, "info.udi", udi);
+
+ return TRUE;
+}
+
+/*--------------------------------------------------------------------------------------------------------------*/
+
+static HalDevice *
pseudo_add (const gchar *sysfs_path, const gchar *device_file, HalDevice *parent_dev, const gchar *parent_path)
{
HalDevice *d;
@@ -3633,6 +3688,14 @@ static DevHandler dev_handler_power_supply =
.remove = dev_remove
};
+static DevHandler dev_handler_drm =
+{
+ .subsystem = "drm",
+ .add = drm_add,
+ .compute_udi = drm_compute_udi,
+ .remove = dev_remove
+};
+
/* SCSI debug, to test thousends of fake devices */
static DevHandler dev_handler_pseudo = {
.subsystem = "pseudo",
@@ -3676,6 +3739,7 @@ static DevHandler *dev_handlers[] = {
&dev_handler_backlight,
&dev_handler_firewire,
&dev_handler_power_supply,
+ &dev_handler_drm,
NULL
};
++++++ hal-add-standby-support.diff ++++++
--- /var/tmp/diff_new_pack.t22104/_old 2007-11-28 23:12:22.000000000 +0100
+++ /var/tmp/diff_new_pack.t22104/_new 2007-11-28 23:12:22.000000000 +0100
@@ -52,58 +52,39 @@
<append key="org.freedesktop.Hal.Device.SystemPowerManagement.method_names" type="strlist">Shutdown</append>
<append key="org.freedesktop.Hal.Device.SystemPowerManagement.method_signatures" type="strlist"></append>
<append key="org.freedesktop.Hal.Device.SystemPowerManagement.method_argnames" type="strlist"></append>
---- hald/linux/osspec.c
-+++ hald/linux/osspec.c
-@@ -434,10 +434,12 @@
- }
-
- static void
--set_suspend_hibernate_keys (HalDevice *d)
-+set_power_state_keys (HalDevice *d)
+--- hald/linux/osspec.c 2007-11-26 22:46:07.000000000 +0100
++++ hald/linux/osspec.c 2007-11-26 22:48:25.000000000 +0100
+@@ -607,11 +607,13 @@
{
-- int can_suspend;
-- int can_hibernate;
-+ gboolean can_suspend;
-+ gboolean can_hibernate;
+ gboolean can_suspend;
+ gboolean can_hibernate;
+ gboolean can_standby;
-+
- ssize_t read;
- size_t len;
char *poweroptions;
-@@ -445,6 +447,7 @@
+ const char *pmtype;
can_suspend = FALSE;
can_hibernate = FALSE;
+ can_standby = FALSE;
/* try to find 'mem' and 'disk' in /sys/power/state */
- fp = fopen ("/sys/power/state", "r");
-@@ -464,6 +467,8 @@
+ poweroptions = hal_util_get_string_from_file("/sys/power/", "state");
+@@ -623,6 +625,8 @@
can_suspend = TRUE;
if (strstr (poweroptions, "disk"))
can_hibernate = TRUE;
+ if (strstr (poweroptions, "standby"))
+ can_standby = TRUE;
- free (poweroptions);
- /* check for the presence of suspend2 */
-@@ -476,6 +481,7 @@
- out:
+ if (!can_suspend) {
+ pmtype = hal_device_property_get_string (d, "power_management.type");
+@@ -646,6 +650,7 @@
hal_device_property_set_bool (d, "power_management.can_suspend", can_suspend);
+ hal_device_property_set_bool (d, "power_management.can_suspend_hybrid", FALSE);
hal_device_property_set_bool (d, "power_management.can_hibernate", can_hibernate);
+ hal_device_property_set_bool (d, "power_management.can_standby", can_standby);
/* WARNING: These keys are depreciated and power_management.can_suspend
* and power_management.can_hibernate should be used instead.
-@@ -533,7 +539,7 @@
- * or hibernate successfully, only that the machine has
- * support compiled into the kernel.
- */
-- set_suspend_hibernate_keys (root);
-+ set_power_state_keys (root);
-
- /* TODO: add prober for PowerMac's */
- if (should_decode_dmi) {
--- tools/Makefile.am
+++ tools/Makefile.am
@@ -88,6 +88,7 @@
@@ -210,7 +191,7 @@
+done
+
+exit $RET
---- policy/hal-power.policy_org 2007-10-17 15:44:00.000000000 +0200
+--- policy/hal-power.policy 2007-10-17 15:44:00.000000000 +0200
+++ policy/hal-power.policy 2007-10-17 15:44:40.000000000 +0200
@@ -79,6 +79,15 @@
</defaults>
++++++ hal-Brightness_Dell_dcdbas.diff ++++++
diff --git a/fdi/policy/10osvendor/10-dell-laptop-brightness.fdi b/fdi/policy/10osvendor/10-dell-laptop-brightness.fdi
index b5a3bff..31ebec2 100644
--- a/fdi/policy/10osvendor/10-dell-laptop-brightness.fdi
+++ b/fdi/policy/10osvendor/10-dell-laptop-brightness.fdi
@@ -9,20 +9,14 @@
to work correctly.
See http://bugs.freedesktop.org/show_bug.cgi?id=7221 for details. -->
<device>
- <match key="system.kernel.name" string="Linux">
- <match key="system.hardware.vendor" string="Dell Computer Corporation">
- <match key="system.formfactor" string="laptop">
- <spawn udi="/org/freedesktop/Hal/devices/dell_lcd_panel"/>
- </match>
- </match>
- </match>
- </device>
-
- <device>
- <match key="system.kernel.name" string="Linux">
- <match key="system.hardware.vendor" string="Dell Inc.">
- <match key="system.formfactor" string="laptop">
- <spawn udi="/org/freedesktop/Hal/devices/dell_lcd_panel"/>
+ <match key="info.bus" string="platform">
+ <match key="platform.id" string="dcdbas">
+ <match key="/org/freedesktop/Hal/devices/computer:system.kernel.name" string="Linux">
+ <match key="/org/freedesktop/Hal/devices/computer:system.hardware.vendor" prefix="Dell ">
+ <match key="/org/freedesktop/Hal/devices/computer:system.formfactor" string="laptop">
+ <spawn udi="/org/freedesktop/Hal/devices/dell_lcd_panel"/>
+ </match>
+ </match>
</match>
</match>
</match>
++++++ hal-cleanup_device.c.diff ++++++
commit 6aa022d4e38302056beeafbd67a6af433822a9bc
Author: Danny Kukawka
Date: Fri Nov 23 23:13:49 2007 +0100
cleanup device.c
Added some comment lines between subsystem code sections. Moved some
functions of subsystems together.
diff --git a/hald/linux/device.c b/hald/linux/device.c
index a03be12..8cc12ef 100644
--- a/hald/linux/device.c
+++ b/hald/linux/device.c
@@ -992,6 +992,8 @@ dvb_compute_udi (HalDevice *d)
return TRUE;
}
+/*--------------------------------------------------------------------------------------------------------------*/
+
static void
asound_card_id_set (int cardnum, HalDevice *d, const char *propertyname)
{
@@ -1011,8 +1013,6 @@ asound_card_id_set (int cardnum, HalDevice *d, const char *propertyname)
}
}
-/*--------------------------------------------------------------------------------------------------------------*/
-
static HalDevice *
sound_add (const gchar *sysfs_path, const gchar *device_file, HalDevice *parent_dev, const gchar *parent_path)
{
@@ -1513,6 +1513,8 @@ mmc_host_compute_udi (HalDevice *d)
return TRUE;
}
+/*--------------------------------------------------------------------------------------------------------------*/
+
static HalDevice *
pci_add (const gchar *sysfs_path, const gchar *device_file, HalDevice *parent_dev, const gchar *parent_path)
{
@@ -2930,6 +2932,8 @@ iucv_compute_udi (HalDevice *d)
}
+/*--------------------------------------------------------------------------------------------------------------*/
+
static HalDevice *
backlight_add (const gchar *sysfs_path, const gchar *device_file, HalDevice *physdev,
const gchar *sysfs_path_in_devices)
@@ -2951,7 +2955,7 @@ backlight_add (const gchar *sysfs_path, const gchar *device_file, HalDevice *phy
}
static gboolean
-power_supply_compute_udi (HalDevice *d)
+backlight_compute_udi (HalDevice *d)
{
gchar udi[256];
const char *dir;
@@ -2961,13 +2965,15 @@ power_supply_compute_udi (HalDevice *d)
name = hal_util_get_last_element(dir);
hal_util_compute_udi (hald_get_gdl (), udi, sizeof (udi),
- "%s_power_supply",
+ "%s_backlight",
hal_device_property_get_string (d, "info.parent"));
hal_device_set_udi (d, udi);
hal_device_property_set_string (d, "info.udi", udi);
return TRUE;
}
+/*--------------------------------------------------------------------------------------------------------------*/
+
static void
refresh_ac_adapter (HalDevice *d)
{
@@ -3271,7 +3277,7 @@ finish:
}
static gboolean
-backlight_compute_udi (HalDevice *d)
+power_supply_compute_udi (HalDevice *d)
{
gchar udi[256];
const char *dir;
@@ -3281,7 +3287,7 @@ backlight_compute_udi (HalDevice *d)
name = hal_util_get_last_element(dir);
hal_util_compute_udi (hald_get_gdl (), udi, sizeof (udi),
- "%s_backlight",
+ "%s_power_supply",
hal_device_property_get_string (d, "info.parent"));
hal_device_set_udi (d, udi);
hal_device_property_set_string (d, "info.udi", udi);
++++++ hal-cleanup_set_suspend_hibernate_keys.diff ++++++
diff --git a/hald/linux/osspec.c b/hald/linux/osspec.c
index fa9dc69..06dad92 100644
--- a/hald/linux/osspec.c
+++ b/hald/linux/osspec.c
@@ -539,27 +539,16 @@ out:
static void
set_suspend_hibernate_keys (HalDevice *d)
{
- int can_suspend;
- int can_hibernate;
- ssize_t read;
- size_t len;
+ gboolean can_suspend;
+ gboolean can_hibernate;
char *poweroptions;
const char *pmtype;
- FILE *fp;
can_suspend = FALSE;
can_hibernate = FALSE;
/* try to find 'mem' and 'disk' in /sys/power/state */
- fp = fopen ("/sys/power/state", "r");
- if (fp == NULL) {
- HAL_WARNING (("Could not open /sys/power/state"));
- goto out;
- }
- poweroptions = NULL;
- len = 0;
- read = getline (&poweroptions, &len, fp);
- fclose (fp);
+ poweroptions = hal_util_get_string_from_file("/sys/power/", "state");
if (poweroptions == NULL) {
HAL_WARNING (("Contents of /sys/power/state invalid"));
goto out;
@@ -568,21 +557,25 @@ set_suspend_hibernate_keys (HalDevice *d)
can_suspend = TRUE;
if (strstr (poweroptions, "disk"))
can_hibernate = TRUE;
- free (poweroptions);
- pmtype = hal_device_property_get_string (d, "power_management.type");
- if (pmtype != NULL && strcmp(pmtype, "pmu") == 0) {
- /* We got our own helper for suspend PMU machines */
- can_suspend = TRUE;
+ if (!can_suspend) {
+ pmtype = hal_device_property_get_string (d, "power_management.type");
+ if (pmtype != NULL && strcmp(pmtype, "pmu") == 0) {
+ /* We got our own helper for suspend PMU machines */
+ can_suspend = TRUE;
+ }
}
- /* check for the presence of suspend2 */
- if (access ("/proc/software_suspend", F_OK) == 0)
- can_hibernate = TRUE;
- if (access ("/proc/suspend2", F_OK) == 0)
- can_hibernate = TRUE;
- if (access ("/sys/power/suspend2/version", F_OK) == 0)
- can_hibernate = TRUE;
+ if (!can_hibernate) {
+ /* check for the presence of suspend2 */
+ if (access ("/proc/software_suspend", F_OK) == 0) {
+ can_hibernate = TRUE;
+ } else if (access ("/proc/suspend2", F_OK) == 0) {
+ can_hibernate = TRUE;
+ } else if (access ("/sys/power/suspend2/version", F_OK) == 0) {
+ can_hibernate = TRUE;
+ }
+ }
out:
hal_device_property_set_bool (d, "power_management.can_suspend", can_suspend);
hal_device_property_set_bool (d, "power_management.can_suspend_hybrid", FALSE);
++++++ hal-fix-libhal_checkUDI_addParameterChecks.diff ++++++
++++ 602 lines (skipped)
++++++ hal-fix-loop_on_empty_fdi_rules.diff ++++++
diff --git a/hald/device_info.c b/hald/device_info.c
index 438ec52..d601e60 100644
--- a/hald/device_info.c
+++ b/hald/device_info.c
@@ -1109,6 +1109,7 @@ rules_match_and_merge_device (void *fdi_rules_list, HalDevice *d)
default:
HAL_WARNING(("Unhandled rule (%i)!", rule->rtype));
+ rule = di_jump(rule);
break;
}
rule = di_next(rule);
++++++ hal-fix-partutil_add_more_checks.diff ++++++
diff --git a/partutil/partutil.c b/partutil/partutil.c
index b22f9b2..35fc82d 100644
--- a/partutil/partutil.c
+++ b/partutil/partutil.c
@@ -325,6 +325,9 @@ part_table_free (PartitionTable *p)
{
GSList *i;
+ if (p == NULL)
+ return;
+
for (i = p->entries; i != NULL; i = i->next) {
PartitionEntry *pe = i->data;
part_entry_free (pe);
@@ -914,7 +917,13 @@ part_table_get_size (PartitionTable *p)
PartitionTable *
part_table_entry_get_nested (PartitionTable *p, int entry)
{
- PartitionEntry *pe = g_slist_nth_data (p->entries, entry);
+ PartitionEntry *pe;
+
+ if (p == NULL)
+ return NULL;
+
+ if ((pe = g_slist_nth_data (p->entries, entry)) == NULL)
+ return NULL;
if (pe->is_part_table)
return pe->part_table;
@@ -933,7 +942,8 @@ part_table_entry_get_type (PartitionTable *p, int entry)
if (p == NULL)
goto out;
- pe = g_slist_nth_data (p->entries, entry);
+ if ((pe = g_slist_nth_data (p->entries, entry)) == NULL)
+ goto out;
switch (p->scheme) {
case PART_TYPE_GPT:
@@ -966,7 +976,8 @@ part_table_entry_get_uuid (PartitionTable *p, int entry)
if (p == NULL)
goto out;
- pe = g_slist_nth_data (p->entries, entry);
+ if ((pe = g_slist_nth_data (p->entries, entry)) == NULL)
+ goto out;
switch (p->scheme) {
case PART_TYPE_GPT:
@@ -991,7 +1002,8 @@ part_table_entry_get_label (PartitionTable *p, int entry)
if (p == NULL)
goto out;
- pe = g_slist_nth_data (p->entries, entry);
+ if ((pe = g_slist_nth_data (p->entries, entry)) == NULL)
+ goto out;
switch (p->scheme) {
case PART_TYPE_GPT:
@@ -1023,7 +1035,8 @@ part_table_entry_get_flags (PartitionTable *p, int entry)
if (p == NULL)
goto out;
- pe = g_slist_nth_data (p->entries, entry);
+ if ((pe = g_slist_nth_data (p->entries, entry)) == NULL)
+ goto out;
ss = g_new0 (char*, 6 + 1); /* hard coded to max items we'll return */
ss[0] = NULL;
@@ -1101,7 +1114,8 @@ part_table_entry_get_offset (PartitionTable *p, int entry)
if (p == NULL)
goto out;
- pe = g_slist_nth_data (p->entries, entry);
+ if ((pe = g_slist_nth_data (p->entries, entry)) == NULL)
+ goto out;
switch (p->scheme) {
case PART_TYPE_GPT:
@@ -1138,7 +1152,8 @@ part_table_entry_get_size (PartitionTable *p, int entry)
if (p == NULL)
goto out;
- pe = g_slist_nth_data (p->entries, entry);
+ if ((pe = g_slist_nth_data (p->entries, entry)) == NULL)
+ goto out;
switch (p->scheme) {
case PART_TYPE_GPT:
++++++ hal-fix-remove_spawned_childs.diff ++++++
diff --git a/hald/linux/device.c b/hald/linux/device.c
index a03be12..8d1859c 100644
--- a/hald/linux/device.c
+++ b/hald/linux/device.c
@@ -3706,6 +3706,18 @@ dev_callouts_remove_done (HalDevice *d, gpointer userdata1, gpointer userdata2)
}
static void
+dev_callouts_remove_child_done (HalDevice *d, gpointer userdata1, gpointer userdata2)
+{
+ HAL_INFO (("Remove callouts completed udi=%s", hal_device_get_udi (d)));
+
+ if (!hal_device_store_remove (hald_get_gdl (), d)) {
+ HAL_WARNING (("Error removing device"));
+ }
+
+ g_object_unref (d);
+}
+static void
+
add_dev_after_probing (HalDevice *d, DevHandler *handler, void *end_token)
{
/* Compute UDI */
@@ -3881,7 +3893,9 @@ hotplug_event_begin_remove_dev (const gchar *subsystem, const gchar *sysfs_path,
{
guint i;
HalDevice *d;
-
+ HalDevice *child;
+ GSList *children;
+ GSList *tmp;
HAL_INFO (("remove_dev: subsys=%s sysfs_path=%s", subsystem, sysfs_path));
@@ -3894,8 +3908,22 @@ hotplug_event_begin_remove_dev (const gchar *subsystem, const gchar *sysfs_path,
handler = dev_handlers[i];
if (strcmp (handler->subsystem, subsystem) == 0) {
- if (strcmp (subsystem, "scsi") == 0)
+ if (strcmp (subsystem, "scsi") == 0) {
missing_scsi_host(sysfs_path, (HotplugEvent *)end_token, HOTPLUG_ACTION_REMOVE);
+ }
+
+ /* check if there are may children left before remove the device */
+ children = hal_device_store_match_multiple_key_value_string (hald_get_gdl (),
+ "info.parent",
+ hal_device_get_udi(d));
+
+ for (tmp = children; tmp != NULL; tmp = g_slist_next (tmp)) {
+ HAL_INFO(("There are childrens of this device left: %s", hal_device_get_udi(d)));
+ child = HAL_DEVICE (tmp->data);
+ HAL_INFO(("Remove now: %s as child of: %s", hal_device_get_udi(child), hal_device_get_udi(d)));
+ hal_util_callout_device_remove (child, dev_callouts_remove_child_done, NULL, NULL);
+ }
+ g_slist_free (children);
handler->remove (d);
hal_util_callout_device_remove (d, dev_callouts_remove_done, end_token, NULL);
++++++ hal-fix-storage-policy-fixed-drives.diff ++++++
--- /var/tmp/diff_new_pack.t22104/_old 2007-11-28 23:12:22.000000000 +0100
+++ /var/tmp/diff_new_pack.t22104/_new 2007-11-28 23:12:22.000000000 +0100
@@ -12,15 +12,15 @@
+ </match>
+</device>
+</deviceinfo>
---- fdi/policy/10osvendor/Makefile.am 2006-03-30 18:54:42.000000000 +0200
-+++ fdi/policy/10osvendor/Makefile.am 2006-03-30 18:55:09.000000000 +0200
-@@ -6,7 +6,8 @@
- 10-power-mgmt-policy.fdi \
- 10-laptop-panel-mgmt-policy.fdi \
+--- fdi/policy/10osvendor/Makefile.am 2007-11-13 16:19:08.000000000 +0100
++++ fdi/policy/10osvendor/Makefile.am 2007-11-13 16:19:27.000000000 +0100
+@@ -10,7 +10,8 @@
+ 10-tabletPCs.fdi \
15-storage-luks.fdi \
-- 20-storage-methods.fdi
-+ 20-storage-methods.fdi \
+ 20-storage-methods.fdi \
+- 30-wol.fdi
++ 30-wol.fdi \
+ 99-storage-policy-fixed-drives.fdi
- if HAVE_SELINUX
- dist_fdi_DATA += 20-storage-add-selinux.fdi
+ if BUILD_KEYMAPS
+ dist_fdi_DATA += 10-keymap.fdi
++++++ hal-fix-util_compute_time_remaining_warning_highTime.diff ++++++
--- /var/tmp/diff_new_pack.t22104/_old 2007-11-28 23:12:22.000000000 +0100
+++ /var/tmp/diff_new_pack.t22104/_new 2007-11-28 23:12:22.000000000 +0100
@@ -23,7 +23,7 @@
/* This shouldn't happen, but check for completeness */
if (remaining_time < 0) {
- HAL_WARNING (("remaining_time %i, returning -1", remaining_time));
-+ HAL_WARNING (("remaining_time %i, returning -1dd", remaining_time));
++ HAL_WARNING (("remaining_time %i, returning -1", remaining_time));
remaining_time = -1;
}
/* Battery life cannot be above 60 hours */
++++++ hal-info-20071017.tar.bz2 -> hal-info-20071120.tar.bz2 ++++++
++++ 3102 lines of diff (skipped)
++++++ hal-info-killswitch_Dell_dcdbas.diff ++++++
diff --git a/fdi/information/10freedesktop/10-dell-rfkill-switch-bluetooth.fdi b/fdi/information/10freedesktop/10-dell-rfkill-switch-bluetooth.fdi
index 231eb17..2d9fa0c 100644
--- a/fdi/information/10freedesktop/10-dell-rfkill-switch-bluetooth.fdi
+++ b/fdi/information/10freedesktop/10-dell-rfkill-switch-bluetooth.fdi
@@ -3,11 +3,14 @@
<deviceinfo version="0.2">
<device>
- <match key="system.kernel.name" string="Linux">
- <match key="system.hardware.vendor" string="Dell Inc.">
- <match key="system.formfactor" string="laptop">
- <!-- TODO: check if laptop actually sports an SMI interface -->
- <spawn udi="/org/freedesktop/Hal/devices/dell_bluetooth_switch"/>
+ <match key="info.bus" string="platform">
+ <match key="platform.id" string="dcdbas">
+ <match key="/org/freedesktop/Hal/devices/computer:system.kernel.name" string="Linux">
+ <match key="/org/freedesktop/Hal/devices/computer:system.hardware.vendor" string="Dell Inc.">
+ <match key="/org/freedesktop/Hal/devices/computer:system.formfactor" string="laptop">
+ <spawn udi="/org/freedesktop/Hal/devices/dell_bluetooth_switch"/>
+ </match>
+ </match>
</match>
</match>
</match>
diff --git a/fdi/information/10freedesktop/10-dell-rfkill-switch-wlan.fdi b/fdi/information/10freedesktop/10-dell-rfkill-switch-wlan.fdi
index 446d6b2..42c6121 100644
--- a/fdi/information/10freedesktop/10-dell-rfkill-switch-wlan.fdi
+++ b/fdi/information/10freedesktop/10-dell-rfkill-switch-wlan.fdi
@@ -3,11 +3,14 @@
<deviceinfo version="0.2">
<device>
- <match key="system.kernel.name" string="Linux">
- <match key="system.hardware.vendor" string="Dell Inc.">
- <match key="system.formfactor" string="laptop">
- <!-- TODO: check if laptop actually sports an SMI interface -->
- <spawn udi="/org/freedesktop/Hal/devices/dell_wlan_switch"/>
+ <match key="info.bus" string="platform">
+ <match key="platform.id" string="dcdbas">
+ <match key="/org/freedesktop/Hal/devices/computer:system.kernel.name" string="Linux">
+ <match key="/org/freedesktop/Hal/devices/computer:system.hardware.vendor" string="Dell Inc.">
+ <match key="/org/freedesktop/Hal/devices/computer:system.formfactor" string="laptop">
+ <spawn udi="/org/freedesktop/Hal/devices/dell_wlan_switch"/>
+ </match>
+ </match>
</match>
</match>
</match>
++++++ hal-linux-ignore_drivers_modules_uvents.diff ++++++
diff --git a/hald/linux/osspec.c b/hald/linux/osspec.c
index fa9dc69..feeb733 100644
--- a/hald/linux/osspec.c
+++ b/hald/linux/osspec.c
@@ -229,32 +230,36 @@ hald_udev_data (GIOChannel *source, GIOCondition condition, gpointer user_data)
hotplug_event->sysfs.seqnum, action, hotplug_event->sysfs.subsystem, hotplug_event->sysfs.sysfs_path,
hotplug_event->sysfs.device_file, hotplug_event->sysfs.net_ifindex));
- if (strcmp (action, "add") == 0) {
- hotplug_event->action = HOTPLUG_ACTION_ADD;
- hotplug_event_enqueue (hotplug_event);
- hotplug_event_process_queue ();
- goto out;
- }
+ /* ignore module and driver events, until we really need them */
+ if ((strcmp (hotplug_event->sysfs.subsystem, "drivers") != 0) &&
+ (strcmp (hotplug_event->sysfs.subsystem, "module") != 0)) {
+ if (strcmp (action, "add") == 0) {
+ hotplug_event->action = HOTPLUG_ACTION_ADD;
+ hotplug_event_enqueue (hotplug_event);
+ hotplug_event_process_queue ();
+ goto out;
+ }
- if (strcmp (action, "change") == 0) {
- hotplug_event->action = HOTPLUG_ACTION_CHANGE;
- hotplug_event_enqueue (hotplug_event);
- hotplug_event_process_queue ();
- goto out;
- }
+ if (strcmp (action, "change") == 0) {
+ hotplug_event->action = HOTPLUG_ACTION_CHANGE;
+ hotplug_event_enqueue (hotplug_event);
+ hotplug_event_process_queue ();
+ goto out;
+ }
- if (strcmp (action, "move") == 0) {
- hotplug_event->action = HOTPLUG_ACTION_MOVE;
- hotplug_event_enqueue (hotplug_event);
- hotplug_event_process_queue ();
- goto out;
- }
+ if (strcmp (action, "move") == 0) {
+ hotplug_event->action = HOTPLUG_ACTION_MOVE;
+ hotplug_event_enqueue (hotplug_event);
+ hotplug_event_process_queue ();
+ goto out;
+ }
- if (strcmp (action, "remove") == 0) {
- hotplug_event->action = HOTPLUG_ACTION_REMOVE;
- hotplug_event_enqueue (hotplug_event);
- hotplug_event_process_queue ();
- goto out;
+ if (strcmp (action, "remove") == 0) {
+ hotplug_event->action = HOTPLUG_ACTION_REMOVE;
+ hotplug_event_enqueue (hotplug_event);
+ hotplug_event_process_queue ();
+ goto out;
+ }
}
invalid:
++++++ hal-performance-changes.diff ++++++
++++ 1548 lines (skipped)
++++++ hal-use-dmi_from_sysfs_v3.diff ++++++
diff --git a/hald/linux/osspec.c b/hald/linux/osspec.c
index fa9dc69..40000bf 100644
--- a/hald/linux/osspec.c
+++ b/hald/linux/osspec.c
@@ -30,6 +30,7 @@
#endif
#define _GNU_SOURCE 1
+#define DMI_SYSFS_PATH "/sys/class/dmi/id"
#include
#include
@@ -304,6 +305,38 @@ GIOChannel *get_mdstat_channel (void)
return mdstat_channel;
}
+/*
+ * NOTE: We need to use this function to parse if HAL is privileged
+ * since some of the dmi keys in sysfs are only readable by root
+ */
+static void
+osspec_privileged_init_preparse_set_dmi (gboolean set, HalDevice *d)
+{
+ gchar *buf;
+ static char *product_serial;
+ static char *product_uuid;
+ static gboolean parsed = FALSE;
+
+ if (g_file_test (DMI_SYSFS_PATH, (G_FILE_TEST_EXISTS | G_FILE_TEST_IS_DIR))) {
+
+ if (!set){
+ if ((buf = hal_util_get_string_from_file(DMI_SYSFS_PATH, "product_serial")) != NULL)
+ product_serial = g_strdup ( buf );
+ if ((buf = hal_util_get_string_from_file(DMI_SYSFS_PATH, "product_uuid")) != NULL)
+ product_uuid = g_strdup ( buf );
+
+ parsed = TRUE;
+ } else {
+ if (d != NULL && parsed) {
+ hal_device_property_set_string (d, "system.hardware.serial", product_serial);
+ hal_device_property_set_string (d, "system.hardware.uuid", product_uuid);
+ g_free (product_serial);
+ g_free (product_uuid);
+ parsed = FALSE;
+ }
+ }
+ }
+}
void
osspec_privileged_init (void)
@@ -332,6 +365,8 @@ osspec_privileged_init (void)
if (err != NULL)
g_error_free (err);
+
+ osspec_privileged_init_preparse_set_dmi(FALSE, NULL);
}
void
@@ -450,11 +485,87 @@ computer_probing_helper_done (HalDevice *d)
}
static void
+computer_dmi_map (HalDevice *d, gboolean dmidecode)
+{
+ /* Map the chassis type from dmidecode.c to a sensible type used in hal
+ *
+ * See also 3.3.4.1 of the "System Management BIOS Reference Specification,
+ * Version 2.3.4" document, available from http://www.dmtf.org/standards/smbios.
+ *
+ * TODO: figure out WTF the mapping should be; "Lunch Box"? Give me a break :-)
+ */
+ static const char *chassis_map[] = {
+ "Other", "unknown", /* 0x01 */
+ "Unknown", "unknown",
+ "Desktop", "desktop",
+ "Low Profile Desktop", "desktop",
+ "Pizza Box", "server",
+ "Mini Tower", "desktop",
+ "Tower", "desktop",
+ "Portable", "laptop",
+ "Laptop", "laptop",
+ "Notebook", "laptop",
+ "Hand Held", "handheld",
+ "Docking Station", "laptop",
+ "All In One", "unknown",
+ "Sub Notebook", "laptop",
+ "Space-saving", "unknown",
+ "Lunch Box", "unknown",
+ "Main Server Chassis", "server",
+ "Expansion Chassis", "unknown",
+ "Sub Chassis", "unknown",
+ "Bus Expansion Chassis", "unknown",
+ "Peripheral Chassis", "unknown",
+ "RAID Chassis", "unknown",
+ "Rack Mount Chassis", "unknown",
+ "Sealed-case PC", "unknown",
+ "Multi-system", "unknown",
+ "CompactPCI", "unknonw",
+ "AdvancedTCA", "unknown", /* 0x1B */
+ NULL
+ };
+
+
+ if (dmidecode) {
+ /* do mapping from text to text type */
+ unsigned int i;
+ const char *chassis_type;
+
+ /* now map the smbios.* properties to our generic system.formfactor property */
+ if ((chassis_type = hal_device_property_get_string (d, "smbios.chassis.type")) != NULL) {
+
+ for (i = 0; chassis_map[i] != NULL; i += 2) {
+ if (strcmp (chassis_map[i], chassis_type) == 0) {
+ hal_device_property_set_string (d, "system.formfactor", chassis_map[i+1]);
+ break;
+ }
+ }
+ }
+ } else {
+ gint chassis_type;
+
+ /* do mapping from integer type to text type*/
+ /* get the chassis type and map it to the related text info */
+ if (hal_util_get_int_from_file(DMI_SYSFS_PATH, "chassis_type", &chassis_type, 10)) {
+
+ if ((chassis_type > 0) && (chassis_type < 28) && (chassis_map[(chassis_type-1)*2] != NULL)) {
+ hal_device_property_set_string (d, "system.chassis.type", chassis_map[((chassis_type-1)*2)]);
+ hal_device_property_set_string (d, "system.formfactor", chassis_map[((chassis_type-1)*2)+1]);
+ }
+
+ } else {
+ hal_device_property_set_string (d, "system.chassis.type", "Unknown");
+ hal_device_property_set_string (d, "system.formfactor", "unknown");
+ }
+ }
+
+}
+
+static void
computer_probing_pcbios_helper_done (HalDevice *d, guint32 exit_type,
gint return_code, gchar **error,
gpointer data1, gpointer data2)
{
- const char *chassis_type;
const char *system_manufacturer;
const char *system_product;
const char *system_version;
@@ -481,56 +592,7 @@ computer_probing_pcbios_helper_done (HalDevice *d, guint32 exit_type,
if (!hal_device_has_property (d, "system.formfactor")) {
- /* now map the smbios.* properties to our generic system.formfactor property */
- if ((chassis_type = hal_device_property_get_string (d, "smbios.chassis.type")) != NULL) {
- unsigned int i;
-
- /* Map the chassis type from dmidecode.c to a sensible type used in hal
- *
- * See also 3.3.4.1 of the "System Management BIOS Reference Specification,
- * Version 2.3.4" document, available from http://www.dmtf.org/standards/smbios.
- *
- * TODO: figure out WTF the mapping should be; "Lunch Box"? Give me a break :-)
- */
- static const char *chassis_map[] = {
- "Other", "unknown", /* 0x01 */
- "Unknown", "unknown",
- "Desktop", "desktop",
- "Low Profile Desktop", "desktop",
- "Pizza Box", "server",
- "Mini Tower", "desktop",
- "Tower", "desktop",
- "Portable", "laptop",
- "Laptop", "laptop",
- "Notebook", "laptop",
- "Hand Held", "handheld",
- "Docking Station", "laptop",
- "All In One", "unknown",
- "Sub Notebook", "laptop",
- "Space-saving", "unknown",
- "Lunch Box", "unknown",
- "Main Server Chassis", "server",
- "Expansion Chassis", "unknown",
- "Sub Chassis", "unknown",
- "Bus Expansion Chassis", "unknown",
- "Peripheral Chassis", "unknown",
- "RAID Chassis", "unknown",
- "Rack Mount Chassis", "unknown",
- "Sealed-case PC", "unknown",
- "Multi-system", "unknown",
- "CompactPCI", "unknonw",
- "AdvancedTCA", "unknown", /* 0x1B */
- NULL
- };
-
- for (i = 0; chassis_map[i] != NULL; i += 2) {
- if (strcmp (chassis_map[i], chassis_type) == 0) {
- hal_device_property_set_string (d, "system.formfactor", chassis_map[i+1]);
- break;
- }
- }
-
- }
+ computer_dmi_map (d, TRUE);
}
out:
computer_probing_helper_done (d);
@@ -661,21 +723,59 @@ probe_openfirmware(HalDevice *root)
detect_openfirmware_formfactor(root);
}
+static gboolean
+decode_dmi_from_sysfs (HalDevice *d)
+{
+ if (g_file_test (DMI_SYSFS_PATH, (G_FILE_TEST_EXISTS | G_FILE_TEST_IS_DIR))) {
+
+ osspec_privileged_init_preparse_set_dmi(TRUE, d);
+ hal_util_set_string_from_file(d, "system.firmware.vendor", DMI_SYSFS_PATH, "bios_vendor");
+ hal_util_set_string_from_file(d, "system.firmware.version", DMI_SYSFS_PATH, "bios_version");
+ hal_util_set_string_from_file(d, "system.firmware.release_date", DMI_SYSFS_PATH, "bios_date");
+ hal_util_set_string_from_file(d, "system.hardware.vendor", DMI_SYSFS_PATH, "sys_vendor");
+ hal_util_set_string_from_file(d, "system.hardware.product", DMI_SYSFS_PATH, "product_name");
+ hal_util_set_string_from_file(d, "system.hardware.version", DMI_SYSFS_PATH, "product_version");
+ hal_util_set_string_from_file(d, "system.chassis.manufacturer", DMI_SYSFS_PATH, "chassis_vendor");
+ computer_dmi_map (d, FALSE);
+
+ /* compatibility keys, remove 28 Feb 2008 */
+ hal_device_copy_property (d, "system.hardware.vendor", d , "smbios.system.manufacturer");
+ hal_device_copy_property (d, "system.hardware.product", d , "smbios.system.product");
+ hal_device_copy_property (d, "system.hardware.version", d , "smbios.system.version");
+ hal_device_copy_property (d, "system.hardware.serial", d , "smbios.system.serial");
+ hal_device_copy_property (d, "system.hardware.uuid", d , "smbios.system.uuid");
+ hal_device_copy_property (d, "system.firmware.vendor", d , "smbios.bios.vendor");
+ hal_device_copy_property (d, "system.firmware.version", d , "smbios.bios.version");
+ hal_device_copy_property (d, "system.firmware.release_date", d , "smbios.bios.release_date");
+ hal_device_copy_property (d, "system.chassis.manufacturer", d , "smbios.chassis.manufacturer");
+ hal_device_copy_property (d, "system.chassis.type", d , "smbios.chassis.type");
+
+ computer_probing_helper_done (d);
+ return TRUE;
+
+ } else {
+ return FALSE;
+ }
+
+}
+
static void
decode_dmi (HalDevice *d)
{
- if (g_file_test ("/usr/sbin/dmidecode", G_FILE_TEST_IS_EXECUTABLE) ||
- g_file_test ("/bin/dmidecode", G_FILE_TEST_IS_EXECUTABLE) ||
- g_file_test ("/sbin/dmidecode", G_FILE_TEST_IS_EXECUTABLE) ||
- g_file_test ("/usr/local/sbin//dmidecode", G_FILE_TEST_IS_EXECUTABLE)) {
- hald_runner_run (d, "hald-probe-smbios", NULL, HAL_HELPER_TIMEOUT,
- computer_probing_pcbios_helper_done, NULL, NULL);
- } else {
- /* no probing */
- probe_openfirmware (d);
- computer_probing_helper_done (d);
- }
-
+ /* try to get the dmi infos from sysfs instead of call dmidecode*/
+ if(!decode_dmi_from_sysfs(d)) {
+ if (g_file_test ("/usr/sbin/dmidecode", G_FILE_TEST_IS_EXECUTABLE) ||
+ g_file_test ("/bin/dmidecode", G_FILE_TEST_IS_EXECUTABLE) ||
+ g_file_test ("/sbin/dmidecode", G_FILE_TEST_IS_EXECUTABLE) ||
+ g_file_test ("/usr/local/sbin/dmidecode", G_FILE_TEST_IS_EXECUTABLE)) {
+ hald_runner_run (d, "hald-probe-smbios", NULL, HAL_HELPER_TIMEOUT,
+ computer_probing_pcbios_helper_done, NULL, NULL);
+ } else {
+ /* no probing */
+ probe_openfirmware (d);
+ computer_probing_helper_done (d);
+ }
+ }
}
static void
@@ -683,8 +783,8 @@ computer_probing_pm_is_supported_helper_done (HalDevice *d, guint32 exit_type,
gint return_code, gchar **error,
gpointer data1, gpointer data2)
{
- HAL_INFO (("In computer_probing_pm_is_supported_helper_done"));
- decode_dmi (d);
+ HAL_INFO (("In computer_probing_pm_is_supported_helper_done"));
+ decode_dmi (d);
}
static void
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org