Hello community,
here is the log from the commit of package hal
checked in at Sun Aug 6 21:45:27 CEST 2006.
--------
--- hal/hal.changes 2006-07-18 13:42:20.000000000 +0200
+++ hal/hal.changes 2006-08-03 23:31:59.000000000 +0200
@@ -1,0 +2,43 @@
+Wed Aug 3 18:47:19 CEST 2006 - dkukawka@suse.de
+
+- updated to upstream HAL git HEAD (v0.5.8_git20060803)
+ --> take a look at the NEWS file and Changelog, way too many
+ changes since last HAL version 0.5.6
+ --> NOTE: hal requires now libvolume_id and PolicyKit
+ --> updated rc script for service policykitd
+- removed upstream gone patches:
+ - hal-update-copyright_header.diff
+ - hal-fix-mount_script_v4.diff
+ - hal-change-scriptpath.diff
+ - hal-fix-addon_acpi_dbus_error.diff
+ - hal-fix-lshal_dbus_error.diff
+ - hal-fix-mount_cleanup_mountpoints_v3.diff
+ - hal-fix-mount_umount_only_by_hal_mounted_v2.diff
+ - hal-fix-mount_options_noexec.diff
+ - hal-fix-mount_script_fstab_check.diff
+ - hal-fix-map_chassitype_to_formfactor_v2.diff
+ - hal-fix-get_prober_serial.diff
+ - hal-add-usb-music_players_to_fdi_v2.diff
+ - hal-fix-apm_remaining_time.diff
+ - hal-fix-nfs_stall_block_hald.diff
+ - hal-fix-CD_DVD-capability.diff
+ - hal-add-debug_to_syslog_probing_v2.diff
+ - hal-fix-probe_smbios_parse_bug172204.diff
+ - hal-fix_workaround_libhal-strage_get_volume_size.diff
+ - hal-fix-memoryleak_libhal-storage_185032.diff
+ - hal-fix-memoryleak_libhal-libhal-storage_187108.diff
+- updated/ported patches to apply against git:
+ - hal-add-wacom_tabletPC_setserial.diff
+ - hal-performance-pci_ids_v2.patch (+fix for compiler warnings)
+ - hal-performance-properties1.diff
+ - hal-performance-properties2.diff
+ - hal-fix-mount_options.diff
+ - hal-fix-apm-poll_battery_reduce_events.diff
+- new patches:
+ - hal-performance-properties_fix_compiler_warnings.diff: fixed
+ compiler warnings in hal-performance-properties*.diff
+ - hal-fix-compiler-warnings.diff: fixed some compiler warnings
+ (warn_unused_result and format issues)
+ - hal-back_to_dbus_0.6.0.diff: only on SLE10 to aviod dbus update
+
+-------------------------------------------------------------------
Old:
----
hal-0.5.6.tar.bz2
hal-add-debug_to_syslog_probing_v2.diff
hal-add-pseudo_devices.diff
hal-add-scsi-type.diff
hal-add-usb-music_players_to_fdi_v2.diff
hal-change-scriptpath.diff
hal-fix-CD_DVD-capability.diff
hal-fix-SG_IO_bug145147.diff
hal-fix-addon_acpi_dbus_error.diff
hal-fix-apm_remaining_time.diff
hal-fix-get_prober_serial.diff
hal-fix-int-size-for-alignment-error-01.patch
hal-fix-lshal_dbus_error.diff
hal-fix-map_chassitype_to_formfactor_v2.diff
hal-fix-memoryleak_libhal-libhal-storage_187108.diff
hal-fix-memoryleak_libhal-storage_185032.diff
hal-fix-memoryleak_libhal-storage_backported_177427.diff
hal-fix-mount-sanitze-mountpoint.diff
hal-fix-mount-umount_172870.diff
hal-fix-mount_cleanup_mountpoints_v3.diff
hal-fix-mount_on_dev_wo_media_check_support.diff
hal-fix-mount_options_noexec.diff
hal-fix-mount_options_vfat.diff
hal-fix-mount_script_fstab_check.diff
hal-fix-mount_script_v4.diff
hal-fix-mount_umount_only_by_hal_mounted_v2.diff
hal-fix-nfs_stall_block_hald.diff
hal-fix-pcmcia_storage.diff
hal-fix-probe_smbios_parse_bug172204.diff
hal-fix-udev-clean_buffer.diff
hal-fix-umount-pcmcia_storage_devices.diff
hal-fix_workaround_libhal-strage_get_volume_size.diff
hal-make-cdroms_USBFloppy-mountable_v2.diff
hal-performance-pci_ids.patch
hal-update-copyright_header.diff
hal-vio-bus.patch
New:
----
hal-0.5.8_git20060803.tar.bz2
hal-back_to_dbus_0.6.0.diff
hal-fix-compiler-warnings.diff
hal-fix-mount_options.diff
hal-performance-pci_ids_v2.patch
hal-performance-properties_fix_compiler_warnings.diff
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ hal.spec ++++++
--- /var/tmp/diff_new_pack.1jM3Fr/_old 2006-08-06 21:44:53.000000000 +0200
+++ /var/tmp/diff_new_pack.1jM3Fr/_new 2006-08-06 21:44:53.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package hal (Version 0.5.6)
+# spec file for package hal (Version 0.5.8_git20060803)
#
# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -11,63 +11,36 @@
# norootforbuild
Name: hal
-BuildRequires: dbus-1-devel docbook-utils doxygen glib2-devel html-dtd intltool libusb perl-XML-Parser popt-devel python-devel update-desktop-files
+BuildRequires: PolicyKit dbus-1-devel docbook-utils doxygen glib2-devel gtkdoc html-dtd intltool libusb libvolume_id-devel perl-XML-Parser popt-devel python-devel update-desktop-files
URL: http://freedesktop.org/Software/hal
-%define dbus_version 0.50
+%define dbus_version 0.61
%define dbus_release 1
-%define kernel_version 2.6.15
License: Other License(s), see package, Other uncritical OpenSource License
Group: System/Daemons
-Version: 0.5.6
-Release: 38
+Version: 0.5.8_git20060803
+Release: 1
Autoreqprov: on
Summary: Daemon for Collecting Hardware Information
# SUSE specific patches
-Patch0: %{name}-make-cdroms_USBFloppy-mountable_v2.diff
-Patch1: %{name}-add-wacom_tabletPC.diff
-Patch2: %{name}-performance-pci_ids.patch
-Patch3: %{name}-performance-properties1.diff
-Patch4: %{name}-add-wacom_tabletPC_setserial.diff
-Patch5: %{name}-fix-mount_159475.diff
-Patch6: %{name}-fix-mount-sanitze-mountpoint.diff
-Patch7: %{name}-performance-properties2.diff
-Patch8: %{name}-fix-mount_on_dev_wo_media_check_support.diff
-Patch9: %{name}-fix-mount_device_fstab_with_user_option_172870.diff
-Patch10: %{name}-fix-mount-umount_172870.diff
-Patch11: %{name}-fix-umount-pcmcia_storage_devices.diff
-# submitted upstream patches
-Patch100: hal-update-copyright_header.diff
-Patch101: hal-fix-mount_script_v4.diff
-Patch102: hal-change-scriptpath.diff
-Patch103: hal-fix-addon_acpi_dbus_error.diff
-Patch104: hal-fix-lshal_dbus_error.diff
-Patch105: hal-fix-mount_cleanup_mountpoints_v3.diff
-Patch106: hal-fix-mount_umount_only_by_hal_mounted_v2.diff
-Patch107: hal-fix-mount_options_noexec.diff
-Patch108: hal-fix-mount_script_fstab_check.diff
-Patch109: hal-fix-map_chassitype_to_formfactor_v2.diff
-Patch110: hal-fix-get_prober_serial.diff
-Patch111: hal-add-usb-music_players_to_fdi_v2.diff
-Patch112: hal-fix-apm_remaining_time.diff
-Patch113: hal-fix-nfs_stall_block_hald.diff
-Patch114: hal-fix-CD_DVD-capability.diff
-Patch115: hal-fix-apm-poll_battery_reduce_events.diff
-Patch116: hal-add-debug_to_syslog_probing_v2.diff
-Patch117: hal-fix-probe_smbios_parse_bug172204.diff
-Patch118: hal-fix_workaround_libhal-strage_get_volume_size.diff
-Patch119: hal-fix-memoryleak_libhal-storage_185032.diff
-Patch120: hal-fix-memoryleak_libhal-libhal-storage_187108.diff
+Patch0: %{name}-add-wacom_tabletPC.diff
+Patch1: %{name}-add-wacom_tabletPC_setserial.diff
+Patch2: %{name}-performance-properties1.diff
+Patch3: %{name}-performance-properties2.diff
+Patch4: %{name}-performance-properties_fix_compiler_warnings.diff
+Patch5: %{name}-fix-mount_options.diff
+# only on SLED10 to avoid dbus update
+Patch6: hal-back_to_dbus_0.6.0.diff
+# submitted (or planed to do in next time) upstream patches
+Patch100: hal-fix-apm-poll_battery_reduce_events.diff
+Patch101: hal-fix-compiler-warnings.diff
+Patch102: hal-performance-pci_ids_v2.patch
# external patches from HAL List and backports
-Patch200: hal-add-scsi-type.diff
-Patch201: hal-fix-SG_IO_bug145147.diff
-Patch202: hal-add-pseudo_devices.diff
-Patch203: hal-fix-udev-clean_buffer.diff
-Patch204: hal-fix-storage-policy-fixed-drives.diff
-Patch205: hal-fix-pcmcia_storage.diff
-Patch206: hal-vio-bus.patch
-Patch207: hal-fix-int-size-for-alignment-error-01.patch
-Patch208: hal-fix-memoryleak_libhal-storage_backported_177427.diff
-Patch209: hal-fix-mount_options_vfat.diff
+# patches we need to port or to check
+# unclear how to fix this atm
+Patch400: %{name}-fix-mount_159475.diff
+# Kay Sievers is working on a integration in the hal mount binary
+Patch401: %{name}-fix-mount_device_fstab_with_user_option_172870.diff
+Patch402: hal-fix-storage-policy-fixed-drives.diff
# patches for testing:
Patch300: hal-change_to_hashtables.patch
# Sources:
@@ -75,7 +48,7 @@
Source1: rc.hal
Source2: 90-hal.rules
Prereq: /usr/sbin/groupadd /usr/sbin/useradd /etc/init.d/boot.localfs
-Requires: dbus-1 >= %{dbus_version}-%{dbus_release}, dbus-1-glib >= %{dbus_version}-%{dbus_release}, aaa_base
+Requires: dbus-1 >= %{dbus_version}-%{dbus_release}, dbus-1-glib >= %{dbus_version}-%{dbus_release}, aaa_base, PolicyKit
Provides: hotplugctl
Obsoletes: hotplugctl
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -156,55 +129,19 @@
%setup -n %{name}-%{version} -q
%patch0
%patch1
-%patch2
-%patch3
-%patch4
-%patch7
-%patch100
-%patch101
%patch102
-%patch103
-%patch104
-%patch105
-%patch106
-%patch107
-%patch108
-%patch5
-%patch6
-%patch109
-%patch110
-%patch111
-%patch112
-%patch113
-%patch114
-%patch115
-%patch200
-%patch201
-%patch202
-%patch203
-%patch204
-%patch205
-%patch206
-%patch207
-%patch8
-%patch116
-%patch117
-%patch118
-%patch9
-%patch208
-%patch10
-%patch11
-%patch119
-%patch120
-%patch209
+%patch2 -p1
+%patch3 -p1
+%patch4
+%patch5 -p1
+#%patch6 -p1
+%patch100 -p1
+%patch101 -p1
#%patch300
-#rm -rf py-compile 4> /dev/null || :
-#ln -s /usr/share/automake-1.9/py-compile py-compile 2> /dev/null || :
%build
export CFLAGS="${RPM_OPT_FLAGS} -fstack-protector"
export CXXFLAGS="${RPM_OPT_FLAGS} -fstack-protector"
-#./autogen.sh
autoreconf -fi
./configure \
--prefix=%{_prefix} \
@@ -270,21 +207,21 @@
%dir %{_sysconfdir}/init.d/haldaemon
%dir %{_sysconfdir}/udev
%dir %{_sysconfdir}/udev/rules.d
+%dir %{_datadir}/doc/packages/hal
%dir %{_datadir}/doc/packages/hal/conf
%dir %{_datadir}/doc/packages/hal/spec
%dir %{_datadir}/hal
%dir %{_datadir}/hal/fdi
%dir %{_libdir}/hal
-%dir %{_libdir}/hal/scripts
%config %{_sysconfdir}/dbus-1/system.d/hal.conf
%{_sysconfdir}/hal/*
%{_sysconfdir}/udev/rules.d/90-hal.rules
+%{_sysconfdir}//PolicyKit/privilege.d/*
%{_bindir}/lshal
%{_bindir}/hal-*-property
%{_bindir}/hal-device
%{_bindir}/hal-find-by-capability
%{_datadir}/hal/fdi/*
-%{_libdir}/hal/scripts/*
%{_libexecdir}/hal/*
%{_datadir}/locale/*/LC_MESSAGES/hal.mo
%{_datadir}/doc/packages/hal/conf/*
@@ -296,14 +233,13 @@
%files -n hal-devel
%defattr(-, root, root)
-%dir %{_datadir}/doc/packages/hal
-%dir %{_datadir}/doc/packages/hal/api
+%dir %{_datadir}/gtk-doc/html/hal
%{_includedir}/*
%{_libdir}/lib*.a
%{_libdir}/lib*.la
%{_libdir}/lib*.so
%{_libdir}/pkgconfig/*
-%{_datadir}/doc/packages/hal/api/*
+%{_datadir}/gtk-doc/html/hal/*
%files -n hal-gnome
%defattr(-, root, root)
@@ -312,6 +248,46 @@
%{_bindir}/hal-device-manager
%changelog -n hal
+* Thu Aug 03 2006 - dkukawka@suse.de
+- updated to upstream HAL git HEAD (v0.5.8_git20060803)
+--> take a look at the NEWS file and Changelog, way too many
+ changes since last HAL version 0.5.6
+--> NOTE: hal requires now libvolume_id and PolicyKit
+--> updated rc script for service policykitd
+- removed upstream gone patches:
+- hal-update-copyright_header.diff
+- hal-fix-mount_script_v4.diff
+- hal-change-scriptpath.diff
+- hal-fix-addon_acpi_dbus_error.diff
+- hal-fix-lshal_dbus_error.diff
+- hal-fix-mount_cleanup_mountpoints_v3.diff
+- hal-fix-mount_umount_only_by_hal_mounted_v2.diff
+- hal-fix-mount_options_noexec.diff
+- hal-fix-mount_script_fstab_check.diff
+- hal-fix-map_chassitype_to_formfactor_v2.diff
+- hal-fix-get_prober_serial.diff
+- hal-add-usb-music_players_to_fdi_v2.diff
+- hal-fix-apm_remaining_time.diff
+- hal-fix-nfs_stall_block_hald.diff
+- hal-fix-CD_DVD-capability.diff
+- hal-add-debug_to_syslog_probing_v2.diff
+- hal-fix-probe_smbios_parse_bug172204.diff
+- hal-fix_workaround_libhal-strage_get_volume_size.diff
+- hal-fix-memoryleak_libhal-storage_185032.diff
+- hal-fix-memoryleak_libhal-libhal-storage_187108.diff
+- updated/ported patches to apply against git:
+- hal-add-wacom_tabletPC_setserial.diff
+- hal-performance-pci_ids_v2.patch (+fix for compiler warnings)
+- hal-performance-properties1.diff
+- hal-performance-properties2.diff
+- hal-fix-mount_options.diff
+- hal-fix-apm-poll_battery_reduce_events.diff
+- new patches:
+- hal-performance-properties_fix_compiler_warnings.diff: fixed
+ compiler warnings in hal-performance-properties*.diff
+- hal-fix-compiler-warnings.diff: fixed some compiler warnings
+ (warn_unused_result and format issues)
+- hal-back_to_dbus_0.6.0.diff: only on SLE10 to aviod dbus update
* Mon Jul 17 2006 - dkukawka@suse.de
- fixed bugs:
- bug #187012: fixed start() and stop() in rchal
++++++ hal-add-wacom_tabletPC_setserial.diff ++++++
--- /var/tmp/diff_new_pack.1jM3Fr/_old 2006-08-06 21:44:53.000000000 +0200
+++ /var/tmp/diff_new_pack.1jM3Fr/_new 2006-08-06 21:44:53.000000000 +0200
@@ -1,26 +1,25 @@
---- tools/Makefile.am 2006-03-20 16:06:06.000000000 +0100
-+++ tools/Makefile.am 2006-03-20 17:08:50.000000000 +0100
-@@ -3,6 +3,7 @@
- SUBDIRS = linux device-manager
+--- tools/Makefile.am
++++ tools/Makefile.am
+@@ -55,7 +55,8 @@ libexec_PROGRAMS =
+ hal-storage-eject \
+ hal-storage-cleanup-mountpoint \
+ hal-storage-cleanup-all-mountpoints \
+- hal-system-power-pmu
++ hal-system-power-pmu \
++ hal-tabletPC-setserial
- INCLUDES = \
-+ -DPACKAGE_LIBEXEC_DIR=\""$(libexecdir)"\" \
- -DPACKAGE_DATA_DIR=\""$(datadir)"\" \
- -DPACKAGE_BIN_DIR=\""$(bindir)"\" \
- -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \
-@@ -33,6 +34,12 @@
- hal_device_SOURCES = hal-device.c
- hal_device_LDADD = @DBUS_LIBS@ $(top_builddir)/libhal/libhal.la
+ hal_storage_mount_SOURCES = hal-storage-mount.c hal-storage-shared.c hal-storage-shared.h
+ hal_storage_mount_LDADD = @GLIB_LIBS@ @POLKIT_LIBS@ @DBUS_LIBS@ $(top_builddir)/libhal/libhal.la $(top_builddir)/libhal-storage/libhal-storage.la
+@@ -72,6 +73,9 @@ hal_storage_cleanup_mountpoint_LDADD = @
+ hal_storage_cleanup_all_mountpoints_SOURCES = hal-storage-cleanup-all-mountpoints.c hal-storage-shared.c hal-storage-shared.h
+ hal_storage_cleanup_all_mountpoints_LDADD = @GLIB_LIBS@ @POLKIT_LIBS@ @DBUS_LIBS@ $(top_builddir)/libhal/libhal.la $(top_builddir)/libhal-storage/libhal-storage.la
-+libexec_PROGRAMS = \
-+ hal-tabletPC-setserial
-+
+hal_tabletPC_setserial_SOURCES = hal-tabletPC-setserial.c
-+hal_tabletPC_setserial_LDADD = -lpopt @PACKAGE_LIBS@ $(top_builddir)/libhal/libhal.la
++hal_tabletPC_setserial_LDADD = -lpopt @GLIB_LIBS@ @DBUS_LIBS@ $(top_builddir)/libhal/libhal.la
+
- if FSTAB_SYNC_ENABLED
- fstab_sync_SOURCES = fstab-sync.c
- fstab_sync_LDADD = -lpopt $(top_builddir)/libhal/libhal.la $(top_builddir)/libhal-storage/libhal-storage.la
+ hal_system_power_pmu_SOURCES = hal-system-power-pmu.c
+ hal_system_power_pmu_LDADD = @DBUS_LIBS@ $(top_builddir)/libhal/libhal.la
+
--- tools/hal-tabletPC-setserial.c 1970-01-01 01:00:00.000000000 +0100
+++ tools/hal-tabletPC-setserial.c 2006-03-20 18:00:59.000000000 +0100
@@ -0,0 +1,108 @@
++++++ hal-back_to_dbus_0.6.0.diff ++++++
diff --git a/tools/hal-device.c b/tools/hal-device.c
index 9bc57a6..0750d9a 100644
--- a/tools/hal-device.c
+++ b/tools/hal-device.c
@@ -157,7 +157,7 @@ int main(int argc, char **argv)
libhal_ctx_shutdown(hal_ctx, &error);
libhal_ctx_free(hal_ctx);
- dbus_connection_close(conn);
+ dbus_connection_disconnect(conn);
dbus_connection_unref(conn);
dbus_error_free(&error);
diff --git a/tools/lshal.c b/tools/lshal.c
index 5e103f8..d4d37a6 100644
--- a/tools/lshal.c
+++ b/tools/lshal.c
@@ -721,7 +721,7 @@ main (int argc, char *argv[])
LIBHAL_FREE_DBUS_ERROR (&error);
libhal_ctx_free (hal_ctx);
- dbus_connection_close (conn);
+ dbus_connection_disconnect (conn);
dbus_connection_unref (conn);
if (show_device)
diff --git a/configure.in b/configure.in
index 1d22924..d1b7a10 100644
--- a/configure.in
+++ b/configure.in
@@ -12,8 +12,8 @@ AM_INIT_AUTOMAKE(hal, 0.5.8)
AM_CONFIG_HEADER(config.h)
AM_MAINTAINER_MODE
-glib_module="glib-2.0 >= 2.6.0 dbus-glib-1 >= 0.61"
-dbus_module="dbus-1 >= 0.61"
+glib_module="glib-2.0 >= 2.6.0 dbus-glib-1 >= 0.60"
+dbus_module="dbus-1 >= 0.60"
volume_id_module="libvolume_id >= 0.66"
polkit_module="polkit >= 0.2"
++++++ hal-fix-apm-poll_battery_reduce_events.diff ++++++
--- /var/tmp/diff_new_pack.1jM3Fr/_old 2006-08-06 21:44:53.000000000 +0200
+++ /var/tmp/diff_new_pack.1jM3Fr/_new 2006-08-06 21:44:53.000000000 +0200
@@ -1,6 +1,8 @@
---- hald/linux2/apm.c 2006-04-17 19:30:45.000000000 +0200
-+++ hald/linux2/apm.c 2006-04-17 19:32:26.000000000 +0200
-@@ -42,6 +42,7 @@
+diff --git a/hald/linux2/apm.c b/hald/linux2/apm.c
+index d0254fb..90dad46 100644
+--- a/hald/linux2/apm.c
++++ b/hald/linux2/apm.c
+@@ -41,6 +41,7 @@ enum {
APM_TYPE_AC_ADAPTER
};
@@ -8,17 +10,18 @@
typedef struct APMDevHandler_s
{
-@@ -205,11 +206,26 @@
- remaining_time = 0;
+@@ -202,11 +203,26 @@ battery_refresh (HalDevice *d, APMDevHan
+ remaining_time = i.battery_time * 60;
}
-- /* set the time to discharge, or 0 for charging */
+- /* set the time on discharge, and remove property on charging because unknown on APM */
- if (remaining_time > 0)
- hal_device_property_set_int (d, "battery.remaining_time", remaining_time);
+- else
+ /* set the time to discharge, or remove key for charging */
+ if (remaining_time > 0) {
+ /* switched from charging to discharging, set key */
-+ if (!is_charging && is_discharging &&
++ if (!is_charging && is_discharging &&
+ !hal_device_has_property(d,"battery.remaining_time")) {
+ hal_device_property_set_int (d, "battery.remaining_time", remaining_time);
+ interval_poll_round = 0;
@@ -29,13 +32,12 @@
+ interval_poll_round = 0;
+ }
+ /* else: only increment counter and set no key to avoid needless events/changes
-+ because APM produce with each read a new value for remaining time */
-+ else
++ because APM produce with each read a new value for remaining time */
++ else
+ interval_poll_round++;
++ } else {
+ hal_device_property_remove (d, "battery.remaining_time");
+ }
- else
-- hal_device_property_remove (d, "battery.remaining_time");
-+ hal_device_property_remove (d, "battery.remaining_time");
/* set the correct charge states */
hal_device_property_set_bool (d, "battery.rechargeable.is_charging", is_charging);
++++++ hal-fix-compiler-warnings.diff ++++++
diff --git a/hald/linux2/addons/addon-acpi-buttons-toshiba.c b/hald/linux2/addons/addon-acpi-buttons-toshiba.c
index 8b12165..b100280 100644
--- a/hald/linux2/addons/addon-acpi-buttons-toshiba.c
+++ b/hald/linux2/addons/addon-acpi-buttons-toshiba.c
@@ -63,8 +63,8 @@ toshiba_key_flush (void)
fprintf (fp, "hotkey_ready:0\n");
fclose (fp);
fp = fopen (TOSHIBA_ACPI_KEYS, "r+");
- fscanf (fp, "hotkey_ready: %d\nhotkey: 0x%4x",
- &hotkey_ready, &value);
+ if (fscanf (fp, "hotkey_ready: %d\nhotkey: 0x%4x", &hotkey_ready, &value) < 2)
+ dbg ("Warning: failure while parse %s", TOSHIBA_ACPI_KEYS);
}
if (fp)
fclose (fp);
@@ -84,8 +84,8 @@ toshiba_key_ready (int *value)
if (!fp)
return FALSE;
- fscanf (fp, "hotkey_ready: %1d\nhotkey: 0x%4x",
- &hotkey_ready, value);
+ if (fscanf (fp, "hotkey_ready: %1d\nhotkey: 0x%4x", &hotkey_ready, value) < 2)
+ dbg ("Warning: failure while parse %s", TOSHIBA_ACPI_KEYS);
if (hotkey_ready) {
fprintf (fp, "hotkey_ready:0\n");
diff --git a/hald-runner/runner.c b/hald-runner/runner.c
index 7d33748..391a51a 100644
--- a/hald-runner/runner.c
+++ b/hald-runner/runner.c
@@ -259,7 +259,8 @@ run_request_run(run_request *r, DBusConn
g_free (program_dir);
if (r->input) {
- write(stdin_v, r->input, strlen(r->input));
+ if (write(stdin_v, r->input, strlen(r->input)) != (ssize_t) strlen(r->input));
+ printf("Warning: Error while wite r->input (%s) to stdin_v.\n", r->input);
close(stdin_v);
}
diff --git a/tools/hal-storage-mount.c b/tools/hal-storage-mount.c
index 53e45a2..bf287be 100644
--- a/tools/hal-storage-mount.c
+++ b/tools/hal-storage-mount.c
@@ -487,14 +487,11 @@ #endif
/* TODO: sanity check that what hal exports is correct (cf. Martin Pitt's email) */
/* read from stdin */
- fgets (mount_point, sizeof (mount_point), stdin);
- fgets (mount_fstype, sizeof (mount_fstype), stdin);
- fgets (mount_options, sizeof (mount_options), stdin);
- if (strlen (mount_point) > 0)
+ if (strlen (fgets (mount_point, sizeof (mount_point), stdin)) > 0)
mount_point [strlen (mount_point) - 1] = '\0';
- if (strlen (mount_fstype) > 0)
+ if (strlen (fgets (mount_fstype, sizeof (mount_fstype), stdin)) > 0)
mount_fstype [strlen (mount_fstype) - 1] = '\0';
- if (strlen (mount_options) > 0)
+ if (strlen (fgets (mount_options, sizeof (mount_options), stdin)) > 0)
mount_options [strlen (mount_options) - 1] = '\0';
/* validate that input from stdin is UTF-8 */
if (!g_utf8_validate (mount_point, -1, &end))
diff --git a/tools/hal-storage-unmount.c b/tools/hal-storage-unmount.c
index 6b1ec1d..285e380 100644
--- a/tools/hal-storage-unmount.c
+++ b/tools/hal-storage-unmount.c
@@ -128,8 +128,7 @@ #ifdef HAVE_POLKIT
#endif
/* read from stdin */
- fgets (unmount_options, sizeof (unmount_options), stdin);
- if (strlen (unmount_options) > 0)
+ if (strlen (fgets (unmount_options, sizeof (unmount_options), stdin)) > 0)
unmount_options [strlen (unmount_options) - 1] = '\0';
/* validate that input from stdin is UTF-8 */
if (!g_utf8_validate (unmount_options, -1, &end))
diff --git a/tools/hal-storage-eject.c b/tools/hal-storage-eject.c
index cb6316a..6cb8ab4 100644
--- a/tools/hal-storage-eject.c
+++ b/tools/hal-storage-eject.c
@@ -187,8 +187,7 @@ #ifdef HAVE_POLKIT
#endif
/* read from stdin */
- fgets (eject_options, sizeof (eject_options), stdin);
- if (strlen (eject_options) > 0)
+ if (strlen (fgets (eject_options, sizeof (eject_options), stdin)) > 0)
eject_options [strlen (eject_options) - 1] = '\0';
/* validate that input from stdin is UTF-8 */
if (!g_utf8_validate (eject_options, -1, &end))
--- a/hald/device.c 2006-08-02 20:10:43.000000000 +0200
+++ b/hald/device.c 2006-08-03 11:34:02.000000000 +0200
@@ -607,7 +607,7 @@
snprintf (buf, bufsize, "%d", hal_property_get_int (prop));
break;
case HAL_PROPERTY_TYPE_UINT64:
- snprintf (buf, bufsize, "%lld", hal_property_get_uint64 (prop));
+ snprintf (buf, bufsize, "%llu", (long long unsigned int) hal_property_get_uint64 (prop));
break;
case HAL_PROPERTY_TYPE_DOUBLE:
snprintf (buf, bufsize, "%f", hal_property_get_double (prop));
@@ -984,9 +984,9 @@
break;
case HAL_PROPERTY_TYPE_UINT64:
- fprintf (stderr, " %s = %lld 0x%llx (uint64)\n", key,
- hal_property_get_uint64 (p),
- hal_property_get_uint64 (p));
+ fprintf (stderr, " %s = %llu 0x%llx (uint64)\n", key,
+ (long long unsigned int) hal_property_get_uint64 (p),
+ (long long unsigned int) hal_property_get_uint64 (p));
break;
case HAL_PROPERTY_TYPE_DOUBLE:
--- a/libhal/libhal.c 2006-08-02 13:56:25.000000000 +0200
+++ b/libhal/libhal.c 2006-08-03 12:31:23.000000000 +0200
@@ -2452,9 +2452,9 @@
libhal_psi_get_int (&i));
break;
case LIBHAL_PROPERTY_TYPE_UINT64:
- printf (" %s = %lld = 0x%llx (uint64)\n", key,
- libhal_psi_get_uint64 (&i),
- libhal_psi_get_uint64 (&i));
+ printf (" %s = %llu = 0x%llx (uint64)\n", key,
+ (long long unsigned int) libhal_psi_get_uint64 (&i),
+ (long long unsigned int) libhal_psi_get_uint64 (&i));
break;
case LIBHAL_PROPERTY_TYPE_BOOLEAN:
printf (" %s = %s (bool)\n", key,
--- a/libhal-storage/libhal-storage.c 2006-08-02 13:56:25.000000000 +0200
+++ b/libhal-storage/libhal-storage.c 2006-08-03 12:45:55.000000000 +0200
@@ -177,7 +177,7 @@
((double)size)/((double)cur), sizes_str[cur_str]);
result = strdup (buf);
} else {
- snprintf (buf, MAX_STRING_SZ, "%lld%s", size / cur, sizes_str[cur_str]);
+ snprintf (buf, MAX_STRING_SZ, "%llu%s", (long long unsigned int) size / cur, sizes_str[cur_str]);
result = strdup (buf);
}
goto out;
--- a/hald/hald_dbus.c 2006-08-02 13:56:25.000000000 +0200
+++ b/hald/hald_dbus.c 2006-08-03 12:48:51.000000000 +0200
@@ -2896,14 +2896,14 @@
{
dbus_int64_t value;
dbus_message_iter_get_basic (&iter, &value);
- g_string_append_printf (stdin_str, "%lld", value);
+ g_string_append_printf (stdin_str, "%lld", (long long int) value);
break;
}
case DBUS_TYPE_UINT64:
{
dbus_uint64_t value;
dbus_message_iter_get_basic (&iter, &value);
- g_string_append_printf (stdin_str, "%llu", value);
+ g_string_append_printf (stdin_str, "%llu", (long long unsigned int) value);
break;
}
case DBUS_TYPE_DOUBLE:
--- a/hald/property.c 2006-08-02 20:10:43.000000000 +0200
+++ b/hald/property.c 2006-08-03 12:58:07.000000000 +0200
@@ -263,7 +263,7 @@
case HAL_PROPERTY_TYPE_INT32:
return g_strdup_printf ("%d", prop->v.int_value);
case HAL_PROPERTY_TYPE_UINT64:
- return g_strdup_printf ("%lld", prop->v.uint64_value);
+ return g_strdup_printf ("%llu", (long long unsigned int) prop->v.uint64_value);
case HAL_PROPERTY_TYPE_BOOLEAN:
/* FIXME: Maybe use 1 and 0 here instead? */
return g_strdup (prop->v.bool_value ? "true" : "false");
--- a/tools/lshal.c 2006-08-02 13:56:25.000000000 +0200
+++ b/tools/lshal.c 2006-08-03 13:01:10.000000000 +0200
@@ -125,10 +125,10 @@
break;
case LIBHAL_PROPERTY_TYPE_UINT64:
- printf (" %s = %lld (0x%llx) (uint64)\n",
+ printf (" %s = %llu (0x%llx) (uint64)\n",
libhal_psi_get_key (&it),
- libhal_psi_get_uint64 (&it),
- libhal_psi_get_uint64 (&it));
+ (long long unsigned int) libhal_psi_get_uint64 (&it),
+ (long long unsigned int) libhal_psi_get_uint64 (&it));
break;
case LIBHAL_PROPERTY_TYPE_DOUBLE:
@@ -420,8 +420,8 @@
case LIBHAL_PROPERTY_TYPE_UINT64:
{
dbus_uint64_t value = libhal_device_get_property_uint64 (hal_ctx, udi, key, &error);
- printf (long_list?"*** new value: %lld (0x%llx) (uint64)\n":"%lld (0x%llx)",
- value, value);
+ printf (long_list?"*** new value: %llu (0x%llx) (uint64)\n":"%llu (0x%llx)",
+ (long long unsigned int) value, (long long unsigned int) value);
}
break;
case LIBHAL_PROPERTY_TYPE_DOUBLE:
--- a/tools/hal_get_property.c 2006-08-02 13:56:25.000000000 +0200
+++ b/tools/hal_get_property.c 2006-08-03 13:19:03.000000000 +0200
@@ -194,8 +194,8 @@
if (is_verbose)
printf ("Type is uint64 (shown in %s)\n",
(is_hex ? "hexadecimal" : "decimal"));
- printf ((is_hex ? "%llx\n" : "%lld\n"),
- libhal_device_get_property_uint64 (hal_ctx, udi, key, &error));
+ printf ((is_hex ? "%llx\n" : "%llu\n"),
+ (long long unsigned int) libhal_device_get_property_uint64 (hal_ctx, udi, key, &error));
break;
case LIBHAL_PROPERTY_TYPE_DOUBLE:
if (is_verbose)
++++++ hal-fix-mount_options_noexec.diff -> hal-fix-mount_options.diff ++++++
--- hal/hal-fix-mount_options_noexec.diff 2006-07-18 13:42:20.000000000 +0200
+++ hal/hal-fix-mount_options.diff 2006-08-03 23:32:00.000000000 +0200
@@ -1,11 +1,13 @@
---- tools/hal-system-storage-mount 2006-02-13 16:40:45.000000000 +0100
-+++ tools/hal-system-storage-mount 2006-02-13 16:44:34.000000000 +0100
-@@ -189,7 +189,7 @@
- fi
+diff --git a/tools/hal-storage-mount.c b/tools/hal-storage-mount.c
+index 597c50e..5b98876 100644
+--- a/tools/hal-storage-mount.c
++++ b/tools/hal-storage-mount.c
+@@ -67,7 +67,7 @@ #define MOUNT_OPTIONS "noexec,nosuid"
+ #define MOUNT_TYPE_OPT "-F"
+ #else
+ #define MOUNT "/bin/mount"
+-#define MOUNT_OPTIONS "noexec,nosuid,nodev"
++#define MOUNT_OPTIONS "nosuid,nodev"
+ #define MOUNT_TYPE_OPT "-t"
+ #endif
- # mount and return status
--RESULT=$(mount -o "noexec,nosuid,nodev$MOUNTOPTIONS" -t "$MOUNTTYPE" "$HAL_PROP_BLOCK_DEVICE" "$MOUNT_ROOT/$MOUNTPOINT" 2>&1)
-+RESULT=$(mount -o "nosuid,nodev$MOUNTOPTIONS" -t "$MOUNTTYPE" "$HAL_PROP_BLOCK_DEVICE" "$MOUNT_ROOT/$MOUNTPOINT" 2>&1)
- if [ $? -ne 0 ]; then
- case "$RESULT" in
- *"unknown filesystem"*)
++++++ hal-performance-pci_ids_v2.patch ++++++
--- hald/linux2/ids.c 2006-02-05 19:57:51.000000000 +0100
+++ hald/linux2/ids.c 2006-02-08 07:53:36.000000000 +0100
@@ -51,10 +51,16 @@
/** Pointer to where the pci.ids file is loaded */
static char *pci_ids = NULL;
+/** Array of pointers to the beginning of the lines */
+static char **pci_ids_list = NULL;
+
/** Length of data store at at pci_ids */
static unsigned int pci_ids_len;
-/** Iterator position into pci_ids */
+/** number of lines in pci_ids_list */
+static unsigned int pci_ids_lines;
+
+/** Iterator position into pci_ids_list */
static unsigned int pci_ids_iter_pos;
/** Initialize the pci.ids line iterator to the beginning of the file */
@@ -80,14 +86,8 @@
unsigned int i;
static char line[PCI_IDS_MAX_LINE_LEN];
- for (i = 0;
- pci_ids_iter_pos < pci_ids_len &&
- i < PCI_IDS_MAX_LINE_LEN - 1 &&
- pci_ids[pci_ids_iter_pos] != '\n'; i++, pci_ids_iter_pos++) {
- line[i] = pci_ids[pci_ids_iter_pos];
- }
-
- line[i] = '\0';
+ i = strlen(pci_ids_list[pci_ids_iter_pos]);
+ strcpy(line, pci_ids_list[pci_ids_iter_pos]);
if (line_len != NULL)
*line_len = i;
@@ -103,7 +103,7 @@
static dbus_bool_t
pci_ids_line_iter_has_more ()
{
- return pci_ids_iter_pos < pci_ids_len;
+ return pci_ids_iter_pos < pci_ids_lines;
}
@@ -279,6 +279,12 @@
{
FILE *fp;
unsigned int num_read;
+ unsigned int line_count;
+ unsigned int i;
+ char *pci_ids_tmp;
+ char *pci_ids_tmp2;
+ char **pci_ids_list_tmp;
+ int start_of_line;
fp = fopen (path, "r");
if (fp == NULL) {
@@ -306,6 +312,61 @@
}
fclose(fp);
+ /*
+ * File loaded into mem. Build pointer list
+ * lines starting with # are skipped.
+ */
+ line_count = 0;
+ pci_ids_tmp = pci_ids;
+ start_of_line = TRUE;
+ do {
+ if (start_of_line && *pci_ids_tmp != '#') line_count++;
+ start_of_line = FALSE;
+ if (*pci_ids_tmp == '\n') start_of_line = TRUE;
+ pci_ids_tmp++;
+ }
+ while (pci_ids_tmp < (pci_ids + pci_ids_len)); /* enddo */
+ /*
+ * create list
+ */
+ pci_ids_list = (char **)malloc(sizeof(char *) * (line_count + 1));
+ if (pci_ids_list == NULL)
+ {
+ HAL_ERROR (("Error loading PCI database file"));
+ free (pci_ids);
+ pci_ids = NULL;
+ return FALSE;
+ } /* endif */
+ memset(pci_ids_list, 0, sizeof(char *) * (line_count + 1));
+ /*
+ * now the beginning of each string into the list
+ */
+ pci_ids_list_tmp = pci_ids_list;
+ pci_ids_tmp = pci_ids;
+ i = 0;
+ while (i < line_count)
+ {
+ if (*pci_ids_tmp != '#')
+ {
+ *pci_ids_list_tmp = pci_ids_tmp;
+ pci_ids_list_tmp++,i++;
+ } /* endif */
+ pci_ids_tmp2 = pci_ids_tmp;
+ pci_ids_tmp = strchr(pci_ids_tmp,'\n');
+ if (pci_ids_tmp != NULL)
+ {
+ /*
+ * replace \n by \0
+ */
+ if ((pci_ids_tmp - pci_ids_tmp2) < PCI_IDS_MAX_LINE_LEN) {
+ *pci_ids_tmp = '\0';
+ } else {
+ *(pci_ids_tmp2 + PCI_IDS_MAX_LINE_LEN) = '\0';
+ }
+ pci_ids_tmp++;
+ } /* endif */
+ } /* endwhile */
+ pci_ids_lines = line_count;
return TRUE;
}
@@ -319,6 +380,8 @@
if (pci_ids != NULL) {
free (pci_ids);
pci_ids = NULL;
+ free (pci_ids_list);
+ pci_ids_list = NULL;
return TRUE;
}
return FALSE;
++++++ hal-performance-properties1.diff ++++++
--- /var/tmp/diff_new_pack.1jM3Fr/_old 2006-08-06 21:44:54.000000000 +0200
+++ /var/tmp/diff_new_pack.1jM3Fr/_new 2006-08-06 21:44:54.000000000 +0200
@@ -1,7 +1,8 @@
-diff -Nru hald/device.c hald/device.c
---- hald/device.c 2006-03-09 21:17:20.000000000 +0100
-+++ hald/device.c 2006-03-14 04:24:01.000000000 +0100
-@@ -38,6 +38,8 @@
+diff --git a/hald/device.c b/hald/device.c
+index eca5a7a..50858ec 100644
+--- a/hald/device.c
++++ b/hald/device.c
+@@ -38,6 +38,8 @@ #include "logger.h"
static GObjectClass *parent_class;
@@ -10,7 +11,7 @@
enum {
PROPERTY_CHANGED,
CAPABILITY_ADDED,
-@@ -134,6 +136,7 @@
+@@ -134,6 +136,7 @@ hal_device_init (HalDevice *device)
temp_device_counter++);
}
@@ -18,7 +19,7 @@
GType
hal_device_get_type (void)
{
-@@ -159,13 +162,32 @@
+@@ -159,13 +162,32 @@ hal_device_get_type (void)
return type;
}
@@ -52,7 +53,7 @@
device = g_object_new (HAL_TYPE_DEVICE, NULL, NULL);
#ifdef HALD_MEMLEAK_DBG
-@@ -403,13 +425,13 @@
+@@ -403,13 +425,13 @@ hal_device_matches (HalDevice *device1,
return TRUE;
}
@@ -68,10 +69,11 @@
void
hal_device_set_udi (HalDevice *device, const char *udi)
{
-diff -Nru hald/device.h hald/device.h
---- hald/device.h 2006-03-09 21:17:20.000000000 +0100
-+++ hald/device.h 2006-03-14 04:24:23.000000000 +0100
-@@ -29,7 +29,6 @@
+diff --git a/hald/device.h b/hald/device.h
+index 590ee03..938d3a8 100644
+--- a/hald/device.h
++++ b/hald/device.h
+@@ -29,7 +29,6 @@ #define DEVICE_H
#include