Hello community, here is the log from the commit of package hal checked in at Tue Apr 18 16:06:56 CEST 2006. -------- --- hal/hal.changes 2006-04-05 16:35:38.000000000 +0200 +++ STABLE/hal/hal.changes 2006-04-18 13:13:49.000000000 +0200 @@ -1,0 +2,16 @@ +Sat Apr 15 21:18:56 CEST 2006 - dkukawka@suse.de + +- added patch: + - hal-fix-CD_DVD-capability.diff: fixed detection of CD/DVD + drive capabilities, added support for DVD+RW DL, fixed detect + DVD-RW (see bug #167101) + - hal-performance-properties2.diff: added patch from Ihno + Krumreich for a better performance (~30%) by use splay_tree + from gcc (see bug #146977) --> patch is in the source but not + in the package atm, need more testing. + - hal-fix-apm-poll_battery_reduce_events.diff: fixed apm battery + polling, now emit remainig time only ever minute instead + with each change every two seconds. This should reduce load + on the dbus-daemon with (k)powersave (see bug #157905) + +------------------------------------------------------------------- Old: ---- hal-performance-properties.diff New: ---- hal-fix-CD_DVD-capability.diff hal-fix-apm-poll_battery_reduce_events.diff hal-performance-properties1.diff hal-performance-properties2.diff ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ hal.spec ++++++ --- /var/tmp/diff_new_pack.LovIZc/_old 2006-04-18 16:06:07.000000000 +0200 +++ /var/tmp/diff_new_pack.LovIZc/_new 2006-04-18 16:06:07.000000000 +0200 @@ -19,17 +19,18 @@ License: Other License(s), see package, Other uncritical OpenSource License Group: System/Daemons Version: 0.5.6 -Release: 22 +Release: 25 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-properties.diff +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 # submitted upstream patches Patch10: hal-update-copyright_header.diff Patch11: hal-fix-mount_script_v4.diff @@ -45,6 +46,8 @@ Patch21: hal-add-usb-music_players_to_fdi_v2.diff Patch22: hal-fix-apm_remaining_time.diff Patch23: hal-fix-nfs_stall_block_hald.diff +Patch24: hal-fix-CD_DVD-capability.diff +Patch25: hal-fix-apm-poll_battery_reduce_events.diff # external patches from HAL List and backports Patch100: hal-add-scsi-type.diff Patch101: hal-fix-SG_IO_bug145147.diff @@ -143,6 +146,7 @@ %patch2 %patch3 %patch4 +#%patch7 %patch10 %patch11 %patch12 @@ -159,6 +163,8 @@ %patch21 %patch22 %patch23 +%patch24 +%patch25 %patch100 %patch101 %patch102 @@ -280,6 +286,19 @@ %{_bindir}/hal-device-manager %changelog -n hal +* Sat Apr 15 2006 - dkukawka@suse.de +- added patch: +- hal-fix-CD_DVD-capability.diff: fixed detection of CD/DVD + drive capabilities, added support for DVD+RW DL, fixed detect + DVD-RW (see bug #167101) +- hal-performance-properties2.diff: added patch from Ihno + Krumreich for a better performance (~30%%) by use splay_tree + from gcc (see bug #146977) --> patch is in the source but not + in the package atm, need more testing. +- hal-fix-apm-poll_battery_reduce_events.diff: fixed apm battery + polling, now emit remainig time only ever minute instead + with each change every two seconds. This should reduce load + on the dbus-daemon with (k)powersave (see bug #157905) * Wed Apr 05 2006 - dkukawka@suse.de - moved addons and prober to %%_libexecdir/hal - fixed patch: ++++++ hal-fix-CD_DVD-capability.diff ++++++ diff -Nur hald/linux2/probing/linux_dvd_rw_utils.c hald/linux2/probing/linux_dvd_rw_utils.c --- hald/linux2/probing/linux_dvd_rw_utils.c 2006-01-16 13:22:16.000000000 +0100 +++ hald/linux2/probing/linux_dvd_rw_utils.c 2006-04-15 19:22:01.000000000 +0200 @@ -179,8 +179,7 @@ get_dvd_r_rw_profile (int fd) { ScsiCommand *cmd; - int retval = -1; - int dvd_plusr_dl = -1; + int retval = 0; unsigned char page[20]; unsigned char *list; int i, len; @@ -221,38 +220,39 @@ for (i = 12; i < list[11]; i += 4) { int profile = (list[i] << 8 | list[i + 1]); - /* 0x1B: DVD+R == 0 - * 0x1A: DVD+RW == 1 - * 0x2B: DVD+R DL == 3 */ - if (profile == 0x1B) { - if (retval == 1) - retval = 2; - else - retval = 0; - } else if (profile == 0x1A) { - if (retval == 0) - retval = 2; - else - retval = 1; - } else if (profile == 0x2B) { - /* DVD+R DL*/ - dvd_plusr_dl = 1; + /* 0x13: DVD-RW Restricted Overwrite + * 0x14: DVD-RW Sequential + * 0x1B: DVD+R + * 0x1A: DVD+RW + * 0x2A: DVD+RW DL + * 0x2B: DVD+R DL + */ + + switch (profile) { + case 0x13: + case 0x14: + retval |= DRIVE_CDROM_CAPS_DVDRW; + break; + case 0x1B: + retval |= DRIVE_CDROM_CAPS_DVDPLUSR; + break; + case 0x1A: + retval |= DRIVE_CDROM_CAPS_DVDPLUSRW; + break; + case 0x2A: + retval |= DRIVE_CDROM_CAPS_DVDPLUSRWDL; + break; + case 0x2B: + retval |= DRIVE_CDROM_CAPS_DVDPLUSRDL; + break; + default: + break; } } scsi_command_free (cmd); free (list); - /* to do: - * - check if DVD+R DL always implied also DVD+R and DVD+RW. - * If so, we don't need this code. */ - if (dvd_plusr_dl == 1) { - if(retval == 2 || retval == 1 ) - retval = 4; - else - retval = 3; - } - return retval; } diff -Nur hald/linux2/probing/linux_dvd_rw_utils.h hald/linux2/probing/linux_dvd_rw_utils.h --- hald/linux2/probing/linux_dvd_rw_utils.h 2006-01-16 13:22:16.000000000 +0100 +++ hald/linux2/probing/linux_dvd_rw_utils.h 2006-04-15 19:20:54.000000000 +0200 @@ -9,6 +9,12 @@ #ifndef LINUX_DVD_RW_UTILS_H #define LINUX_DVD_RW_UTILS_H +#define DRIVE_CDROM_CAPS_DVDRW 1 +#define DRIVE_CDROM_CAPS_DVDPLUSR 2 +#define DRIVE_CDROM_CAPS_DVDPLUSRW 4 +#define DRIVE_CDROM_CAPS_DVDPLUSRWDL 8 +#define DRIVE_CDROM_CAPS_DVDPLUSRDL 16 + int get_dvd_r_rw_profile (int fd); int get_read_write_speed (int fd, int *read_speed, int *write_speed, char **write_speeds); int get_disc_type (int fd); diff -Nur hald/linux2/probing/probe-storage.c hald/linux2/probing/probe-storage.c --- hald/linux2/probing/probe-storage.c 2006-01-16 22:56:42.000000000 +0100 +++ hald/linux2/probing/probe-storage.c 2006-04-15 19:33:14.000000000 +0200 @@ -268,6 +268,7 @@ libhal_device_set_property_bool (ctx, udi, "storage.cdrom.dvdram", FALSE, &error); libhal_device_set_property_bool (ctx, udi, "storage.cdrom.dvdplusr", FALSE, &error); libhal_device_set_property_bool (ctx, udi, "storage.cdrom.dvdplusrw", FALSE, &error); + libhal_device_set_property_bool (ctx, udi, "storage.cdrom.dvdplusrwdl", FALSE, &error); libhal_device_set_property_bool (ctx, udi, "storage.cdrom.dvdplusrdl", FALSE, &error); if (capabilities & CDC_CD_R) { @@ -280,28 +281,21 @@ if (capabilities & CDC_DVD) { int profile; - /** @todo FIXME BUG XXX: need to check for dvdrw (prolly need to rewrite much of - * the linux_dvdrw_utils.c file) - */ - libhal_device_set_property_bool (ctx, udi, "storage.cdrom.dvd", TRUE, &error); profile = get_dvd_r_rw_profile (fd); - if (profile == 2) { - libhal_device_set_property_bool (ctx, udi, "storage.cdrom.dvdplusr", TRUE, &error); - libhal_device_set_property_bool (ctx, udi, "storage.cdrom.dvdplusrw", TRUE, &error); - } else if (profile == 0) { + dbg ("get_dvd_r_rw_profile returned: %d", profile); + + if (profile & DRIVE_CDROM_CAPS_DVDRW) + libhal_device_set_property_bool (ctx, udi, "storage.cdrom.dvdrw", TRUE, &error); + if (profile & DRIVE_CDROM_CAPS_DVDPLUSR) libhal_device_set_property_bool(ctx, udi, "storage.cdrom.dvdplusr", TRUE, &error); - } else if (profile == 1) { + if (profile & DRIVE_CDROM_CAPS_DVDPLUSRW) libhal_device_set_property_bool (ctx, udi, "storage.cdrom.dvdplusrw", TRUE, &error); - } else if (profile == 3) { - libhal_device_set_property_bool (ctx, udi, "storage.cdrom.dvdplusr", TRUE, &error); + if (profile & DRIVE_CDROM_CAPS_DVDPLUSRWDL) + libhal_device_set_property_bool (ctx, udi, "storage.cdrom.dvdplusrwdl", TRUE, &error); + if (profile & DRIVE_CDROM_CAPS_DVDPLUSRDL) libhal_device_set_property_bool (ctx, udi, "storage.cdrom.dvdplusrdl", TRUE, &error); - } else if (profile == 4) { - libhal_device_set_property_bool (ctx, udi, "storage.cdrom.dvdplusr", TRUE, &error); - libhal_device_set_property_bool (ctx, udi, "storage.cdrom.dvdplusrw", TRUE, &error); - libhal_device_set_property_bool (ctx, udi, "storage.cdrom.dvdplusrdl", TRUE, &error); - } } if (capabilities & CDC_DVD_R) { libhal_device_set_property_bool (ctx, udi, "storage.cdrom.dvdr", TRUE, &error); diff -Nur libhal-storage/libhal-storage.c libhal-storage/libhal-storage.c --- libhal-storage/libhal-storage.c 2006-04-15 19:57:26.000000000 +0200 +++ libhal-storage/libhal-storage.c 2006-04-15 19:45:43.000000000 +0200 @@ -288,7 +288,8 @@ } if ((drive_cdrom_caps & LIBHAL_DRIVE_CDROM_CAPS_DVDRW) && (drive_cdrom_caps & LIBHAL_DRIVE_CDROM_CAPS_DVDPLUSRW)) { - if(drive_cdrom_caps & LIBHAL_DRIVE_CDROM_CAPS_DVDPLUSRDL) + if(drive_cdrom_caps & LIBHAL_DRIVE_CDROM_CAPS_DVDPLUSRDL || + drive_cdrom_caps & LIBHAL_DRIVE_CDROM_CAPS_DVDPLUSRWDL) second = "/DVD±RW DL"; else second = "/DVD±RW"; @@ -887,6 +888,7 @@ LIBHAL_PROP_EXTRACT_BOOL_BITFIELD ("storage.cdrom.dvd", drive->cdrom_caps, LIBHAL_DRIVE_CDROM_CAPS_DVDROM); LIBHAL_PROP_EXTRACT_BOOL_BITFIELD ("storage.cdrom.dvdplusr", drive->cdrom_caps, LIBHAL_DRIVE_CDROM_CAPS_DVDPLUSR); LIBHAL_PROP_EXTRACT_BOOL_BITFIELD ("storage.cdrom.dvdplusrw", drive->cdrom_caps, LIBHAL_DRIVE_CDROM_CAPS_DVDPLUSRW); + LIBHAL_PROP_EXTRACT_BOOL_BITFIELD ("storage.cdrom.dvdplusrwdl", drive->cdrom_caps, LIBHAL_DRIVE_CDROM_CAPS_DVDPLUSRWDL); LIBHAL_PROP_EXTRACT_BOOL_BITFIELD ("storage.cdrom.dvdplusrdl", drive->cdrom_caps, LIBHAL_DRIVE_CDROM_CAPS_DVDPLUSRDL); LIBHAL_PROP_EXTRACT_BOOL_BITFIELD ("storage.cdrom.dvdr", drive->cdrom_caps, LIBHAL_DRIVE_CDROM_CAPS_DVDR); LIBHAL_PROP_EXTRACT_BOOL_BITFIELD ("storage.cdrom.dvdrw", drive->cdrom_caps, LIBHAL_DRIVE_CDROM_CAPS_DVDRW); diff -Nur libhal-storage/libhal-storage.h libhal-storage/libhal-storage.h --- libhal-storage/libhal-storage.h 2006-01-15 17:54:05.000000000 +0100 +++ libhal-storage/libhal-storage.h 2006-04-15 19:39:33.000000000 +0200 @@ -168,16 +168,17 @@ } LibHalDriveType; typedef enum { - LIBHAL_DRIVE_CDROM_CAPS_CDROM = 0x0001, - LIBHAL_DRIVE_CDROM_CAPS_CDR = 0x0002, - LIBHAL_DRIVE_CDROM_CAPS_CDRW = 0x0004, - LIBHAL_DRIVE_CDROM_CAPS_DVDRAM = 0x0008, - LIBHAL_DRIVE_CDROM_CAPS_DVDROM = 0x0010, - LIBHAL_DRIVE_CDROM_CAPS_DVDR = 0x0020, - LIBHAL_DRIVE_CDROM_CAPS_DVDRW = 0x0040, - LIBHAL_DRIVE_CDROM_CAPS_DVDPLUSR = 0x0080, - LIBHAL_DRIVE_CDROM_CAPS_DVDPLUSRW = 0x0100, - LIBHAL_DRIVE_CDROM_CAPS_DVDPLUSRDL = 0x0120 + LIBHAL_DRIVE_CDROM_CAPS_CDROM = 0x0001, + LIBHAL_DRIVE_CDROM_CAPS_CDR = 0x0002, + LIBHAL_DRIVE_CDROM_CAPS_CDRW = 0x0004, + LIBHAL_DRIVE_CDROM_CAPS_DVDRAM = 0x0008, + LIBHAL_DRIVE_CDROM_CAPS_DVDROM = 0x0010, + LIBHAL_DRIVE_CDROM_CAPS_DVDR = 0x0020, + LIBHAL_DRIVE_CDROM_CAPS_DVDRW = 0x0040, + LIBHAL_DRIVE_CDROM_CAPS_DVDPLUSR = 0x0080, + LIBHAL_DRIVE_CDROM_CAPS_DVDPLUSRW = 0x0100, + LIBHAL_DRIVE_CDROM_CAPS_DVDPLUSRWDL = 0x0200, + LIBHAL_DRIVE_CDROM_CAPS_DVDPLUSRDL = 0x0400 } LibHalDriveCdromCaps; --- doc/spec/hal-spec.xml.in 2006-01-16 13:22:16.000000000 +0100 +++ doc/spec/hal-spec.xml.in 2006-04-17 18:55:11.000000000 +0200 @@ -3319,6 +3319,12 @@ <entry>TRUE when the optical drive can blank and write to DVD+RW discs</entry> </row> <row> + <entry><literal>storage.cdrom.dvdplusrwdl</literal> (bool)</entry> + <entry></entry> + <entry>Yes</entry> + <entry>TRUE when the optical drive can blank and write to DVD+RW Dual-Layer discs</entry> + </row> + <row> <entry><literal>storage.cdrom.dvdplusrdl</literal> (bool)</entry> <entry></entry> <entry>Yes</entry> ++++++ hal-fix-apm-poll_battery_reduce_events.diff ++++++ --- 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 @@ APM_TYPE_AC_ADAPTER }; +int interval_poll_round = 0; typedef struct APMDevHandler_s { @@ -205,11 +206,26 @@ remaining_time = 0; } - /* set the time to discharge, or 0 for charging */ - if (remaining_time > 0) - hal_device_property_set_int (d, "battery.remaining_time", remaining_time); + /* 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 && + !hal_device_has_property(d,"battery.remaining_time")) { + hal_device_property_set_int (d, "battery.remaining_time", remaining_time); + interval_poll_round = 0; + } + /* after 60 seconds (30*APM_POLL_INTERVAL) set key */ + else if (interval_poll_round == 30) { + hal_device_property_set_int (d, "battery.remaining_time", remaining_time); + 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 + interval_poll_round++; + } 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-performance-properties.diff -> hal-performance-properties1.diff ++++++ ++++++ hal-performance-properties.diff -> hal-performance-properties2.diff ++++++ ++++ 1343 lines (skipped) ++++ between hal/hal-performance-properties.diff ++++ and STABLE/hal/hal-performance-properties2.diff ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun...
participants (1)
-
root@suse.de