rpms/hal/devel hal-0.5.9-fixes.patch, 1.1, 1.2 hal.spec, 1.129, 1.130 firewire-ioctl-changes.patch, 1.1, NONE
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Wed Apr 25 19:39:51 UTC 2007
Author: davidz
Update of /cvs/dist/rpms/hal/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv28489
Modified Files:
hal-0.5.9-fixes.patch hal.spec
Removed Files:
firewire-ioctl-changes.patch
Log Message:
* Wed Apr 25 2007 David Zeuthen <davidz at redhat.com> - 0.5.9-6
- Pick up the latest fixes from 0.5.9 stable branch
- Drop firewire prober patch as this is already in the 0.5.9 stable branch
- Resolves: #237871 (pass correct quirks)
hal-0.5.9-fixes.patch:
NEWS | 28 +++++++++++++++++-
configure.in | 4 +-
doc/spec/hal-spec-fdi-files.xml | 8 ++---
fdi/policy/10osvendor/10-keyboard-policy.fdi | 8 +++--
fdi/policy/10osvendor/10-macbookpro-utils.fdi | 15 +++++++++
fdi/policy/10osvendor/20-storage-methods.fdi | 1
hald/device_info.c | 31 ++++++++++----------
hald/freebsd/hf-pci.c | 13 ++++++--
hald/freebsd/hf-storage.c | 26 ++++++++++++++++
hald/freebsd/hf-usb.c | 8 +++--
hald/hald.c | 3 -
hald/hald_dbus.c | 1
hald/linux/probing/probe-ieee1394-unit.c | 13 +++-----
hald/linux/probing/probe-volume.c | 40 ++++++++++++++++----------
hald/mmap_cache.c | 6 +--
libhal/libhal.c | 3 +
partutil/Makefile.am | 11 +------
tools/hal-luks-setup | 14 ++++-----
tools/hal-luks-teardown | 14 ++++-----
tools/linux/hal-system-power-hibernate-linux | 6 +--
tools/linux/hal-system-power-suspend-linux | 6 +--
21 files changed, 171 insertions(+), 88 deletions(-)
Index: hal-0.5.9-fixes.patch
===================================================================
RCS file: /cvs/dist/rpms/hal/devel/hal-0.5.9-fixes.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- hal-0.5.9-fixes.patch 12 Apr 2007 20:17:38 -0000 1.1
+++ hal-0.5.9-fixes.patch 25 Apr 2007 19:39:49 -0000 1.2
@@ -97,6 +97,44 @@
<match key="info.capabilities" contains_not="button">
<append key="info.capabilities" type="strlist">button</append>
</match>
+diff --git a/fdi/policy/10osvendor/10-macbookpro-utils.fdi b/fdi/policy/10osvendor/10-macbookpro-utils.fdi
+index 1b0ac67..8aed6c0 100644
+--- a/fdi/policy/10osvendor/10-macbookpro-utils.fdi
++++ b/fdi/policy/10osvendor/10-macbookpro-utils.fdi
+@@ -11,6 +11,21 @@
+ <spawn udi="/org/freedesktop/Hal/devices/macbook_pro_keyboard_backlight"/>
+ <spawn udi="/org/freedesktop/Hal/devices/macbook_pro_lcd_panel"/>
+ </match>
++ <match key="system.hardware.product" string="MacBookPro1,2">
++ <spawn udi="/org/freedesktop/Hal/devices/macbook_pro_light_sensor"/>
++ <spawn udi="/org/freedesktop/Hal/devices/macbook_pro_keyboard_backlight"/>
++ <spawn udi="/org/freedesktop/Hal/devices/macbook_pro_lcd_panel"/>
++ </match>
++ <match key="system.hardware.product" string="MacBookPro2,1">
++ <spawn udi="/org/freedesktop/Hal/devices/macbook_pro_light_sensor"/>
++ <spawn udi="/org/freedesktop/Hal/devices/macbook_pro_keyboard_backlight"/>
++ <spawn udi="/org/freedesktop/Hal/devices/macbook_pro_lcd_panel"/>
++ </match>
++ <match key="system.hardware.product" string="MacBookPro2,2">
++ <spawn udi="/org/freedesktop/Hal/devices/macbook_pro_light_sensor"/>
++ <spawn udi="/org/freedesktop/Hal/devices/macbook_pro_keyboard_backlight"/>
++ <spawn udi="/org/freedesktop/Hal/devices/macbook_pro_lcd_panel"/>
++ </match>
+ </match>
+ </match>
+ </device>
+diff --git a/fdi/policy/10osvendor/20-storage-methods.fdi b/fdi/policy/10osvendor/20-storage-methods.fdi
+index 79904f2..b2b190f 100644
+--- a/fdi/policy/10osvendor/20-storage-methods.fdi
++++ b/fdi/policy/10osvendor/20-storage-methods.fdi
+@@ -186,6 +186,7 @@
+ <append key="volume.mount.valid_options" type="strlist">gid=</append>
+ <append key="volume.mount.valid_options" type="strlist">umask=</append>
+ <append key="volume.mount.valid_options" type="strlist">locale=</append>
++ <append key="volume.mount.valid_options" type="strlist">utf8</append>
+ </match>
+ <match key="/org/freedesktop/Hal/devices/computer:system.kernel.name" string="FreeBSD">
+ <append key="volume.mount.valid_options" type="strlist">-u=</append>
diff --git a/hald/device_info.c b/hald/device_info.c
index 8355011..3b9cf7b 100644
--- a/hald/device_info.c
@@ -145,6 +183,124 @@
}
if (rule->type_match == MATCH_CONTAINS) {
+diff --git a/hald/freebsd/hf-pci.c b/hald/freebsd/hf-pci.c
+index 400f183..8709913 100644
+--- a/hald/freebsd/hf-pci.c
++++ b/hald/freebsd/hf-pci.c
+@@ -38,6 +38,7 @@
+
+ #include "../hald.h"
+ #include "../ids.h"
++#include "../device.h"
+ #include "../logger.h"
+ #include "../util.h"
+
+@@ -210,9 +211,15 @@ hf_pci_probe_bus (HalDevice *parent, int bus, bitstr_t *busmap)
+
+ info = g_new(DeviceInfo, 1);
+ info->device = hf_device_store_match(hald_get_gdl(),
+- hal_property_new_int("pci.freebsd.bus", p->pc_sel.pc_bus),
+- hal_property_new_int("pci.freebsd.device", p->pc_sel.pc_dev),
+- hal_property_new_int("pci.freebsd.function", p->pc_sel.pc_func),
++ "pci.freebsd.bus",
++ HAL_PROPERTY_TYPE_INT32,
++ p->pc_sel.pc_bus,
++ "pci.freebsd.device",
++ HAL_PROPERTY_TYPE_INT32,
++ p->pc_sel.pc_dev,
++ "pci.freebsd.function",
++ HAL_PROPERTY_TYPE_INT32,
++ p->pc_sel.pc_func,
+ NULL);
+ info->p = *p;
+ info->secondary_bus = hf_pci_get_register(p, PCIR_SECBUS_1);
+diff --git a/hald/freebsd/hf-storage.c b/hald/freebsd/hf-storage.c
+index 19c3ad7..347aef3 100644
+--- a/hald/freebsd/hf-storage.c
++++ b/hald/freebsd/hf-storage.c
+@@ -65,6 +65,7 @@ static GNode *hf_storage_geom_tree = NULL;
+ static GHashTable *hf_storage_geom_hash = NULL;
+
+ static void hf_storage_init_geom (void);
++static gboolean hf_storage_device_has_addon (HalDevice *device);
+
+ static void
+ hf_storage_geom_free (gpointer data)
+@@ -587,7 +588,8 @@ hf_storage_conftxt_timeout_cb (gpointer data)
+ {
+ /* disk changed */
+ device = hf_devtree_find_from_name(hald_get_gdl(), disk->name);
+- if (device && hal_device_has_capability(device, "storage"))
++ if (device && hal_device_has_capability(device, "storage") &&
++ ! hf_storage_device_has_addon(device))
+ hf_storage_device_rescan_real(device);
+ }
+ }
+@@ -768,6 +770,28 @@ hf_storage_device_rescan (HalDevice *device)
+ return FALSE;
+ }
+
++static gboolean
++hf_storage_device_has_addon (HalDevice *device)
++{
++ HalDeviceStrListIter iter;
++
++ g_return_val_if_fail(device != NULL, FALSE);
++
++ for (hal_device_property_strlist_iter_init(device, "info.addons", &iter);
++ hal_device_property_strlist_iter_is_valid(&iter);
++ hal_device_property_strlist_iter_next(&iter))
++ {
++ const char *addon;
++
++ addon = hal_device_property_strlist_iter_get_value(&iter);
++
++ if (! strcmp(addon, "hald-addon-storage"))
++ return TRUE;
++ }
++
++ return FALSE;
++}
++
+ HFHandler hf_storage_handler = {
+ .init = hf_storage_init,
+ .probe = hf_storage_probe,
+diff --git a/hald/freebsd/hf-usb.c b/hald/freebsd/hf-usb.c
+index f7b2bf0..b7991b5 100644
+--- a/hald/freebsd/hf-usb.c
++++ b/hald/freebsd/hf-usb.c
+@@ -372,11 +372,11 @@ hf_usb_device_new (HalDevice *parent,
+ can_wake_up = (config_desc.bmAttributes & UC_REMOTE_WAKEUP) != 0;
+ num_interfaces = config_desc.bNumInterface;
+
+- if (config_desc->iConfiguration != 0)
++ if (config_desc.iConfiguration != 0)
+ {
+ char *configuration;
+
+- configuration = hf_usb_get_string_descriptor(controller->fd, di->udi_addr, config_desc->iConfiguration, NULL);
++ configuration = hf_usb_get_string_descriptor(controller->fd, di->udi_addr, config_desc.iConfiguration, NULL);
+ if (configuration)
+ {
+ hal_device_property_set_string(device, "usb_device.configuration", configuration);
+@@ -424,6 +424,8 @@ hf_usb_device_new (HalDevice *parent,
+
+ static HalDevice *
+ hf_usb_interface_device_new (HalDevice *parent,
++ Controller *controller,
++ const struct usb_device_info *di,
+ const usb_interface_descriptor_t *desc)
+ {
+ HalDevice *device;
+@@ -576,7 +578,7 @@ hf_usb_probe_device (HalDevice *parent,
+ break;
+ }
+
+- if_device = hf_usb_interface_device_new(device, if_desc);
++ if_device = hf_usb_interface_device_new(device, controller, device_info, if_desc);
+ hf_device_preprobe_and_add(if_device);
+
+ p += USB_INTERFACE_DESCRIPTOR_SIZE + if_desc->bNumEndpoints * USB_ENDPOINT_DESCRIPTOR_SIZE;
diff --git a/hald/hald.c b/hald/hald.c
index 1a13a31..9135440 100644
--- a/hald/hald.c
@@ -171,6 +327,93 @@
}
dbus_error_init (&error);
+diff --git a/hald/linux/probing/probe-ieee1394-unit.c b/hald/linux/probing/probe-ieee1394-unit.c
+index bfa3ed0..70facfd 100644
+--- a/hald/linux/probing/probe-ieee1394-unit.c
++++ b/hald/linux/probing/probe-ieee1394-unit.c
+@@ -83,14 +83,11 @@ struct fw_cdev_event_request {
+ __u32 data[0];
+ };
+
+-#define FW_CDEV_IOC_GET_INFO _IO('#', 0x00)
+-#define FW_CDEV_IOC_SEND_REQUEST _IO('#', 0x01)
+-#define FW_CDEV_IOC_ALLOCATE _IO('#', 0x02)
+-#define FW_CDEV_IOC_DEALLOCATE _IO('#', 0x03)
+-#define FW_CDEV_IOC_SEND_RESPONSE _IO('#', 0x04)
+-#define FW_CDEV_IOC_INITIATE_BUS_RESET _IO('#', 0x05)
+-#define FW_CDEV_IOC_ADD_DESCRIPTOR _IO('#', 0x06)
+-#define FW_CDEV_IOC_REMOVE_DESCRIPTOR _IO('#', 0x07)
++#define FW_CDEV_IOC_GET_INFO _IOWR('#', 0x00, struct fw_cdev_get_info)
++#define FW_CDEV_IOC_SEND_REQUEST _IOW('#', 0x01, struct fw_cdev_send_request)
++#define FW_CDEV_IOC_ALLOCATE _IOWR('#', 0x02, struct fw_cdev_allocate)
++#define FW_CDEV_IOC_DEALLOCATE _IOW('#', 0x03, struct fw_cdev_deallocate)
++#define FW_CDEV_IOC_SEND_RESPONSE _IOW('#', 0x04, struct fw_cdev_send_response)
+
+ /* FW_CDEV_VERSION History
+ *
+diff --git a/hald/linux/probing/probe-volume.c b/hald/linux/probing/probe-volume.c
+index d5963db..b003b25 100644
+--- a/hald/linux/probing/probe-volume.c
++++ b/hald/linux/probing/probe-volume.c
+@@ -122,33 +122,43 @@ set_volume_id_values (LibHalContext *ctx, const char *udi, LibHalChangeSet *cs,
+ libhal_changeset_set_property_string (cs, "volume.fsusage", usage);
+ HAL_DEBUG (("volume.fsusage = '%s'", usage));
+
+- libhal_changeset_set_property_string (cs, "volume.fstype", vid->type);
++ if (!libhal_changeset_set_property_string (cs, "volume.fstype", vid->type))
++ libhal_changeset_set_property_string (cs, "volume.fstype", "");
++
+ HAL_DEBUG(("volume.fstype = '%s'", vid->type));
++
+ if (vid->type_version[0] != '\0') {
+ libhal_changeset_set_property_string (cs, "volume.fsversion", vid->type_version);
+ HAL_DEBUG(("volume.fsversion = '%s'", vid->type_version));
+ }
++
+ libhal_changeset_set_property_string (cs, "volume.uuid", vid->uuid);
+ HAL_DEBUG(("volume.uuid = '%s'", vid->uuid));
+
+- /* we need to be sure for a utf8 valid label, because dbus accept only utf8 valid strings */
+- volume_label = strdup_valid_utf8 (vid->label);
+- if( volume_label != NULL ) {
+- libhal_changeset_set_property_string (cs, "volume.label", volume_label);
+- HAL_DEBUG(("volume.label = '%s'", volume_label));
++ if(vid->label != NULL && vid->label[0] != '\0') {
++ /* we need to be sure for a utf8 valid label, because dbus accept only utf8 valid strings */
++ volume_label = strdup_valid_utf8 (vid->label);
++ if( volume_label != NULL ) {
++ libhal_changeset_set_property_string (cs, "volume.label", volume_label);
++ HAL_DEBUG(("volume.label = '%s'", volume_label));
+
+- if (strlen(volume_label) > 0) {
+- libhal_changeset_set_property_string (cs, "info.product", volume_label);
+- }
+- else {
+- snprintf (buf, sizeof (buf), "Volume (%s)", vid->type);
+- libhal_changeset_set_property_string (cs, "info.product", buf);
++ if (strlen(volume_label) > 0) {
++ libhal_changeset_set_property_string (cs, "info.product", volume_label);
++ g_free(volume_label);
++ return;
++ }
++
++ g_free(volume_label);
+ }
+- g_free(volume_label);
+- } else {
++ }
++
++ if (vid->type != NULL) {
+ snprintf (buf, sizeof (buf), "Volume (%s)", vid->type);
+- libhal_changeset_set_property_string (cs, "info.product", buf);
++ } else {
++ snprintf (buf, sizeof (buf), "Volume (unknown)");
+ }
++
++ libhal_changeset_set_property_string (cs, "info.product", buf);
+ }
+
+ static void
diff --git a/hald/mmap_cache.c b/hald/mmap_cache.c
index 1711f3f..1170bd8 100644
--- a/hald/mmap_cache.c
@@ -189,6 +432,45 @@
}
regen_cache_done = TRUE;
+diff --git a/libhal/libhal.c b/libhal/libhal.c
+index 8e76032..0f229c5 100644
+--- a/libhal/libhal.c
++++ b/libhal/libhal.c
+@@ -3821,6 +3821,9 @@ libhal_changeset_set_property_string (LibHalChangeSet *changeset, const char *ke
+ {
+ LibHalChangeSetElement *elem;
+
++ LIBHAL_CHECK_PARAM_VALID(key, "*key", FALSE);
++ LIBHAL_CHECK_PARAM_VALID(value, "*value", FALSE);
++
+ elem = calloc (1, sizeof (LibHalChangeSetElement));
+ if (elem == NULL)
+ goto out;
+diff --git a/partutil/Makefile.am b/partutil/Makefile.am
+index bf48de6..5c7b8f3 100644
+--- a/partutil/Makefile.am
++++ b/partutil/Makefile.am
+@@ -1,17 +1,12 @@
+-if HALD_COMPILE_SOLARIS
+-# do nothing
+-else if HALD_COMPILE_FREEBSD
+-# do nothing
+-else
++if HALD_COMPILE_LINUX
++noinst_LTLIBRARIES = libpartutil.la
++endif
+
+ INCLUDES = @GLIB_CFLAGS@
+
+-noinst_LTLIBRARIES = libpartutil.la
+-
+ libpartutil_la_SOURCES = partutil.h partutil.c ../hald/logger.c
+
+ libpartutil_la_LIBADD = @GLIB_LIBS@ @PARTED_LIBS@
+
+ clean-local :
+ rm -f *~
+-endif
diff --git a/tools/hal-luks-setup b/tools/hal-luks-setup
index 154bde6..4e91d55 100755
--- a/tools/hal-luks-setup
@@ -247,3 +529,39 @@
locked_out
fi
fi
+diff --git a/tools/linux/hal-system-power-hibernate-linux b/tools/linux/hal-system-power-hibernate-linux
+index 250e191..d38c509 100755
+--- a/tools/linux/hal-system-power-hibernate-linux
++++ b/tools/linux/hal-system-power-hibernate-linux
+@@ -18,10 +18,10 @@ QUIRKS=""
+ [ "$HAL_PROP_POWER_MANAGEMENT_QUIRK_S3_MODE" = "true" ] && QUIRKS="$QUIRKS --quirk-s3-mode"
+ [ "$HAL_PROP_POWER_MANAGEMENT_QUIRK_DPMS_SUSPEND" = "true" ] && QUIRKS="$QUIRKS --quirk-dpms-suspend"
+ [ "$HAL_PROP_POWER_MANAGEMENT_QUIRK_DPMS_ON" = "true" ] && QUIRKS="$QUIRKS --quirk-dpms-on"
+-[ "$HAL_PROP_POWER_MANAGEMENT_QUIRK_VBESTATE_RESTORE" = "true" ] && QUIRKS="$QUIRKS --quirk-vbestate"
+-[ "$HAL_PROP_POWER_MANAGEMENT_QUIRK_VBEMODE_RESTORE" = "true" ] && QUIRKS="$QUIRKS --quirk-vbemode"
++[ "$HAL_PROP_POWER_MANAGEMENT_QUIRK_VBESTATE_RESTORE" = "true" ] && QUIRKS="$QUIRKS --quirk-vbestate-restore"
++[ "$HAL_PROP_POWER_MANAGEMENT_QUIRK_VBEMODE_RESTORE" = "true" ] && QUIRKS="$QUIRKS --quirk-vbemode-restore"
+ [ "$HAL_PROP_POWER_MANAGEMENT_QUIRK_VGA_MODE_3" = "true" ] && QUIRKS="$QUIRKS --quirk-vga-mode3"
+-[ "$HAL_PROP_POWER_MANAGEMENT_QUIRK_VBE_POST" = "true" ] && QUIRKS="$QUIRKS --quirk-vbepost"
++[ "$HAL_PROP_POWER_MANAGEMENT_QUIRK_VBE_POST" = "true" ] && QUIRKS="$QUIRKS --quirk-vbe-post"
+ [ "$HAL_PROP_POWER_MANAGEMENT_QUIRK_RADEON_OFF" = "true" ] && QUIRKS="$QUIRKS --quirk-radeon-off"
+
+ #ALTLinux only supports powersave
+diff --git a/tools/linux/hal-system-power-suspend-linux b/tools/linux/hal-system-power-suspend-linux
+index 8139842..d101b52 100755
+--- a/tools/linux/hal-system-power-suspend-linux
++++ b/tools/linux/hal-system-power-suspend-linux
+@@ -26,10 +26,10 @@ QUIRKS=""
+ [ "$HAL_PROP_POWER_MANAGEMENT_QUIRK_S3_MODE" = "true" ] && QUIRKS="$QUIRKS --quirk-s3-mode"
+ [ "$HAL_PROP_POWER_MANAGEMENT_QUIRK_DPMS_SUSPEND" = "true" ] && QUIRKS="$QUIRKS --quirk-dpms-suspend"
+ [ "$HAL_PROP_POWER_MANAGEMENT_QUIRK_DPMS_ON" = "true" ] && QUIRKS="$QUIRKS --quirk-dpms-on"
+-[ "$HAL_PROP_POWER_MANAGEMENT_QUIRK_VBESTATE_RESTORE" = "true" ] && QUIRKS="$QUIRKS --quirk-vbestate"
+-[ "$HAL_PROP_POWER_MANAGEMENT_QUIRK_VBEMODE_RESTORE" = "true" ] && QUIRKS="$QUIRKS --quirk-vbemode"
++[ "$HAL_PROP_POWER_MANAGEMENT_QUIRK_VBESTATE_RESTORE" = "true" ] && QUIRKS="$QUIRKS --quirk-vbestate-restore"
++[ "$HAL_PROP_POWER_MANAGEMENT_QUIRK_VBEMODE_RESTORE" = "true" ] && QUIRKS="$QUIRKS --quirk-vbemode-restore"
+ [ "$HAL_PROP_POWER_MANAGEMENT_QUIRK_VGA_MODE_3" = "true" ] && QUIRKS="$QUIRKS --quirk-vga-mode3"
+-[ "$HAL_PROP_POWER_MANAGEMENT_QUIRK_VBE_POST" = "true" ] && QUIRKS="$QUIRKS --quirk-vbepost"
++[ "$HAL_PROP_POWER_MANAGEMENT_QUIRK_VBE_POST" = "true" ] && QUIRKS="$QUIRKS --quirk-vbe-post"
+ [ "$HAL_PROP_POWER_MANAGEMENT_QUIRK_RADEON_OFF" = "true" ] && QUIRKS="$QUIRKS --quirk-radeon-off"
+
+ #PMU systems cannot use /sys/power/state yet, so use a helper to issue an ioctl
Index: hal.spec
===================================================================
RCS file: /cvs/dist/rpms/hal/devel/hal.spec,v
retrieving revision 1.129
retrieving revision 1.130
diff -u -r1.129 -r1.130
--- hal.spec 18 Apr 2007 15:22:12 -0000 1.129
+++ hal.spec 25 Apr 2007 19:39:49 -0000 1.130
@@ -24,13 +24,12 @@
Summary: Hardware Abstraction Layer
Name: hal
Version: 0.5.9
-Release: 5%{?dist}
+Release: 6%{?dist}
URL: http://www.freedesktop.org/Software/hal
Source0: http://people.freedesktop.org/~david/dist/%{name}-%{version}.tar.gz
Source1: 99-redhat-storage-policy-fixed-drives.fdi
Source2: hal-device-manager.desktop
Patch0: hal-0.5.9-fixes.patch
-Patch500: firewire-ioctl-changes.patch
License: AFL/GPL
Group: System Environment/Libraries
@@ -128,7 +127,6 @@
%prep
%setup -q
%patch0 -p 1 -b .fixes
-%patch500 -p1 -b .firewire-ioctl-changes
%build
%configure --enable-docbook-docs --docdir=%{_datadir}/doc/%{name}-%{version} --with-os-type=redhat --enable-console-kit --enable-acl-management --enable-umount-helper --enable-acpi-ibm --enable-acpi-toshiba --with-eject=/usr/sbin/eject
@@ -262,6 +260,11 @@
%{_datadir}/applications/*.desktop
%changelog
+* Wed Apr 25 2007 David Zeuthen <davidz at redhat.com> - 0.5.9-6
+- Pick up the latest fixes from 0.5.9 stable branch
+- Drop firewire prober patch as this is already in the 0.5.9 stable branch
+- Resolves: #237871 (pass correct quirks)
+
* Wed Apr 18 2007 Kristian Høgsberg <krh at redhat.com> - 0.5.9-5
- Update firewire prober to use correct ioctl codes.
--- firewire-ioctl-changes.patch DELETED ---
More information about the fedora-cvs-commits
mailing list