Package: hal
Version: 0.5.13-2
Severity: normal
On GNU/kFreeBSD, the hal code is a bit outdated and does not present
the input.keys capability.
A new version of 50_kfreebsd.patch patch with the require changes is
attached. Those change will also be submitted upstream soon.
Could you please update this patch in the next upload? Thanks in advance.
-- System Information:
Debian Release: squeeze/sid
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: kfreebsd-i386 (i686)
Kernel: kFreeBSD 7.2-1-686
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages hal depends on:
ii acl 2.2.47-3 Access control list utilities
ii adduser 3.110 add and remove users and groups
ii consolekit 0.3.0-3 framework for defining and trackin
ii dbus 1.2.16-2 simple interprocess messaging syst
ii freebsd-utils 7.2-7 FreeBSD utilities needed for GNU/k
ii hal-info 20090716-1 Hardware Abstraction Layer - fdi f
ii libblkid1 2.16-2.1 block device id library
ii libc0.1 2.9-24 GNU C Library: Shared libraries
ii libcam0 7.2-3 FreeBSD CAM (Common Access Method)
ii libdbus-1-3 1.2.16-2 simple interprocess messaging syst
ii libdbus-glib-1-2 0.82-1 simple interprocess messaging syst
ii libexpat1 2.0.1-4 XML parsing C library - runtime li
ii libglib2.0-0 2.20.4-1 The GLib library of C routines
ii libhal-storage1 0.5.13-2 Hardware Abstraction Layer - share
ii libhal1 0.5.13-2 Hardware Abstraction Layer - share
ii libpolkit2 0.9-4 library for accessing PolicyKit
ii libusbhid3 7.2-3 FreeBSD library to access USB HID
ii lsb-base 3.2-23 Linux Standard Base 3.2 init scrip
ii pciutils 1:3.1.3-2 Linux PCI Utilities
ii policykit 0.9-4 framework for managing administrat
ii usbutils 0.84-1 Linux USB utilities
Versions of packages hal recommends:
ii eject 2.1.5+deb1+cvs20081104-6 ejects CDs and operates CD-Changer
Versions of packages hal suggests:
pn gnome-device-manager <none> (no description available)
-- no debconf information
--- a/hald/freebsd/libprobe/Makefile.am
+++ b/hald/freebsd/libprobe/Makefile.am
@@ -8,7 +8,7 @@ AM_CPPFLAGS = \
@DBUS_CFLAGS@
if HALD_COMPILE_FREEBSD
-lib_LTLIBRARIES = libhald_freebsd_probe.la
+noinst_LTLIBRARIES = libhald_freebsd_probe.la
endif
libhald_freebsd_probe_la_SOURCES = \
--- a/hald/freebsd/libprobe/Makefile.in
+++ b/hald/freebsd/libprobe/Makefile.in
@@ -42,15 +42,7 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
-am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
-am__vpath_adj = case $$p in \
- $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
- *) f=$$p;; \
- esac;
-am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
-am__installdirs = "$(DESTDIR)$(libdir)"
-libLTLIBRARIES_INSTALL = $(INSTALL)
-LTLIBRARIES = $(lib_LTLIBRARIES)
+LTLIBRARIES = $(noinst_LTLIBRARIES)
libhald_freebsd_probe_la_LIBADD =
am_libhald_freebsd_probe_la_OBJECTS = hfp.lo hfp-cdrom.lo
libhald_freebsd_probe_la_OBJECTS = \
@@ -58,8 +50,7 @@ libhald_freebsd_probe_la_OBJECTS = \
libhald_freebsd_probe_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(libhald_freebsd_probe_la_LDFLAGS) $(LDFLAGS) -o $@
-...@hald_compile_freebsd_true@am_libhald_freebsd_probe_la_rpath = -rpath \
-...@hald_compile_freebsd_true@ $(libdir)
+...@hald_compile_freebsd_true@am_libhald_freebsd_probe_la_rpath =
DEFAULT_INCLUDES = -...@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
@@ -244,7 +235,7 @@ AM_CPPFLAGS = \
-I$(top_srcdir) -I.. \
@DBUS_CFLAGS@
-...@hald_compile_freebsd_true@lib_LTLIBRARIES = libhald_freebsd_probe.la
+...@hald_compile_freebsd_true@noinst_LTLIBRARIES = libhald_freebsd_probe.la
libhald_freebsd_probe_la_SOURCES = \
hfp.c \
hfp.h \
@@ -285,28 +276,10 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-install-libLTLIBRARIES: $(lib_LTLIBRARIES)
- @$(NORMAL_INSTALL)
- test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
- @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
- if test -f $$p; then \
- f=$(am__strip_dir) \
- echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \
- $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
- else :; fi; \
- done
-
-uninstall-libLTLIBRARIES:
- @$(NORMAL_UNINSTALL)
- @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
- p=$(am__strip_dir) \
- echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \
- $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \
- done
-clean-libLTLIBRARIES:
- -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
- @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+clean-noinstLTLIBRARIES:
+ -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
+ @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
test "$$dir" != "$$p" || dir=.; \
echo "rm -f \"$${dir}/so_locations\""; \
@@ -428,9 +401,6 @@ check-am: all-am
check: check-am
all-am: Makefile $(LTLIBRARIES)
installdirs:
- for dir in "$(DESTDIR)$(libdir)"; do \
- test -z "$$dir" || $(MKDIR_P) "$$dir"; \
- done
install: install-am
install-exec: install-exec-am
install-data: install-data-am
@@ -457,7 +427,7 @@ maintainer-clean-generic:
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
-clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
+clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
mostlyclean-am
distclean: distclean-am
@@ -480,7 +450,7 @@ install-data-am:
install-dvi: install-dvi-am
-install-exec-am: install-libLTLIBRARIES
+install-exec-am:
install-html: install-html-am
@@ -512,23 +482,22 @@ ps: ps-am
ps-am:
-uninstall-am: uninstall-libLTLIBRARIES
+uninstall-am:
.MAKE: install-am install-strip
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
- clean-libLTLIBRARIES clean-libtool ctags distclean \
+ clean-libtool clean-noinstLTLIBRARIES ctags distclean \
distclean-compile distclean-generic distclean-libtool \
distclean-tags distdir dvi dvi-am html html-am info info-am \
install install-am install-data install-data-am install-dvi \
install-dvi-am install-exec install-exec-am install-html \
- install-html-am install-info install-info-am \
- install-libLTLIBRARIES install-man install-pdf install-pdf-am \
- install-ps install-ps-am install-strip installcheck \
- installcheck-am installdirs maintainer-clean \
- maintainer-clean-generic mostlyclean mostlyclean-compile \
- mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
- tags uninstall uninstall-am uninstall-libLTLIBRARIES
+ install-html-am install-info install-info-am install-man \
+ install-pdf install-pdf-am install-ps install-ps-am \
+ install-strip installcheck installcheck-am installdirs \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+ pdf pdf-am ps ps-am tags uninstall uninstall-am
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
--- a/hald/freebsd/probing/Makefile.am
+++ b/hald/freebsd/probing/Makefile.am
@@ -30,15 +30,15 @@ hald_probe_scsi_LDADD = \
$(top_builddir)/hald/freebsd/libprobe/libhald_freebsd_probe.la
hald_probe_storage_SOURCES = freebsd_dvd_rw_utils.c freebsd_dvd_rw_utils.h probe-storage.c
-hald_probe_storage_CPPFLAGS = $(AM_CPPFLAGS) @GLIB_CFLAGS@ @VOLUME_ID_CFLAGS@
+hald_probe_storage_CPPFLAGS = $(AM_CPPFLAGS) @GLIB_CFLAGS@ @BLKID_CFLAGS@
hald_probe_storage_LDADD = \
@GLIB_LIBS@ \
- @VOLUME_ID_LIBS@ \
+ @BLKID_LIBS@ \
$(top_builddir)/hald/freebsd/libprobe/libhald_freebsd_probe.la
hald_probe_volume_SOURCES = freebsd_dvd_rw_utils.c freebsd_dvd_rw_utils.h probe-volume.c
-hald_probe_volume_CPPFLAGS = $(AM_CPPFLAGS) @GLIB_CFLAGS@ @VOLUME_ID_CFLAGS@
+hald_probe_volume_CPPFLAGS = $(AM_CPPFLAGS) @GLIB_CFLAGS@ @BLKID_CFLAGS@
hald_probe_volume_LDADD = \
@GLIB_LIBS@ \
- @VOLUME_ID_LIBS@ \
+ @BLKID_LIBS@ \
$(top_builddir)/hald/freebsd/libprobe/libhald_freebsd_probe.la
--- a/hald/freebsd/probing/Makefile.in
+++ b/hald/freebsd/probing/Makefile.in
@@ -272,17 +272,17 @@
$(top_builddir)/hald/freebsd/libprobe/libhald_freebsd_probe.la
hald_probe_storage_SOURCES = freebsd_dvd_rw_utils.c freebsd_dvd_rw_utils.h probe-storage.c
-hald_probe_storage_CPPFLAGS = $(AM_CPPFLAGS) @GLIB_CFLAGS@ @VOLUME_ID_CFLAGS@
+hald_probe_storage_CPPFLAGS = $(AM_CPPFLAGS) @GLIB_CFLAGS@ @BLKID_CFLAGS@
hald_probe_storage_LDADD = \
@GLIB_LIBS@ \
- @VOLUME_ID_LIBS@ \
+ @BLKID_LIBS@ \
$(top_builddir)/hald/freebsd/libprobe/libhald_freebsd_probe.la
hald_probe_volume_SOURCES = freebsd_dvd_rw_utils.c freebsd_dvd_rw_utils.h probe-volume.c
-hald_probe_volume_CPPFLAGS = $(AM_CPPFLAGS) @GLIB_CFLAGS@ @VOLUME_ID_CFLAGS@
+hald_probe_volume_CPPFLAGS = $(AM_CPPFLAGS) @GLIB_CFLAGS@ @BLKID_CFLAGS@
hald_probe_volume_LDADD = \
@GLIB_LIBS@ \
- @VOLUME_ID_LIBS@ \
+ @BLKID_LIBS@ \
$(top_builddir)/hald/freebsd/libprobe/libhald_freebsd_probe.la
all: all-am
--- a/hald/freebsd/addons/addon-storage.c
+++ b/hald/freebsd/addons/addon-storage.c
@@ -181,10 +181,12 @@
static void
update_proc_title (const char *device, boolean polling_enabled)
{
+#ifndef __GLIBC__
if (polling_enabled)
setproctitle("%s", device);
else
setproctitle("no polling on %s because it is explicitly disabled", device);
+#endif
}
static DBusHandlerResult
--- a/hald/freebsd/probing/probe-storage.c
+++ b/hald/freebsd/probing/probe-storage.c
@@ -33,7 +33,7 @@
#include <sys/types.h>
#include <netinet/in.h>
#include <glib.h>
-#include <libvolume_id.h>
+#include <blkid.h>
#include "libhal/libhal.h"
@@ -191,8 +191,10 @@
if (! parent)
goto end;
+#ifndef __GLIBC__
/* give a meaningful process title for ps(1) */
setproctitle("%s", device_file);
+#endif
has_children = hfp_getenv_bool("HF_HAS_CHILDREN");
only_check_for_media = hfp_getenv_bool("HF_ONLY_CHECK_FOR_MEDIA");
@@ -217,16 +219,38 @@
}
else if (! has_children) /* by definition, if it has children it has no fs */
{
- struct volume_id *vid;
+ blkid_probe pr;
+ int fd;
- vid = volume_id_open_node(device_file);
- if (! vid)
+ fd = open(device_file, O_RDONLY);
+ if (fd < 0)
goto end;
- if (volume_id_probe_all(vid, 0, 0) == 0 && vid->usage_id == VOLUME_ID_FILESYSTEM)
- ret = 2; /* has a filesystem */
-
- volume_id_close(vid);
+ pr = blkid_new_probe ();
+ if (pr != NULL)
+ {
+ blkid_probe_set_request (pr, BLKID_PROBREQ_LABEL | BLKID_PROBREQ_UUID |
+ BLKID_PROBREQ_TYPE | BLKID_PROBREQ_SECTYPE |
+ BLKID_PROBREQ_USAGE | BLKID_PROBREQ_VERSION);
+ if (blkid_probe_set_device (pr, fd, 0, 0) == 0 &&
+ blkid_do_safeprobe (pr) == 0)
+ {
+ const char *usage;
+
+ /* signal to hald that we've found something and a fakevolume
+ * should be added - see hald/linux/blockdev.c:add_blockdev_probing_helper_done()
+ * and hald/linux/blockdev.c:block_rescan_storage_done().
+ */
+ if (blkid_probe_lookup_value (pr, "USAGE", &usage, NULL) == 0 &&
+ (strcmp (usage, "filesystem") == 0 ||
+ strcmp (usage, "raid") == 0 ||
+ strcmp (usage, "other") == 0 ||
+ strcmp (usage, "crypto") == 0))
+ ret = 2;
+ }
+ blkid_free_probe (pr);
+ }
+ close (fd);
}
end:
--- a/hald/freebsd/probing/probe-hiddev.c
+++ b/hald/freebsd/probing/probe-hiddev.c
@@ -62,8 +62,10 @@
if (fd < 0)
goto end;
+#ifndef __GLIBC__
/* give a meaningful process title for ps(1) */
setproctitle("%s", device_file);
+#endif
if (ioctl(fd, USB_GET_REPORT_ID, &report_id) < 0)
goto end;
@@ -120,30 +120,22 @@
hid_dispose_report_desc(report_desc);
- if (is_keyboard || is_mouse || is_joystick)
+ if (is_keyboard || is_mouse || is_joystick || is_keypad)
{
libhal_device_add_capability(hfp_ctx, hfp_udi, "input", &hfp_error);
+ libhal_device_set_property_string(hfp_ctx, hfp_udi, "info.category", "input.keyboard", &hfp_error);
libhal_device_set_property_string(hfp_ctx, hfp_udi, "input.device", device_file, &hfp_error);
}
if (is_keyboard)
- {
libhal_device_add_capability(hfp_ctx, hfp_udi, "input.keyboard", &hfp_error);
- libhal_device_set_property_string(hfp_ctx, hfp_udi, "info.category", "input.keyboard", &hfp_error);
- }
if (is_keypad)
libhal_device_add_capability(hfp_ctx, hfp_udi, "input.keypad", &hfp_error);
if (is_keyboard || is_keypad)
libhal_device_add_capability(hfp_ctx, hfp_udi, "input.keys", &hfp_error);
if (is_mouse)
- {
libhal_device_add_capability(hfp_ctx, hfp_udi, "input.mouse", &hfp_error);
- libhal_device_set_property_string(hfp_ctx, hfp_udi, "info.category", "input.mouse", &hfp_error);
- }
if (is_joystick)
- {
libhal_device_add_capability(hfp_ctx, hfp_udi, "input.joystick", &hfp_error);
- libhal_device_set_property_string(hfp_ctx, hfp_udi, "info.category", "input.joystick", &hfp_error);
- }
end:
return 0;
--- a/hald/freebsd/probing/probe-scsi.c
+++ b/hald/freebsd/probing/probe-scsi.c
@@ -47,8 +47,10 @@
if (! device_file)
goto end;
+#ifndef __GLIBC__
/* give a meaningful process title for ps(1) */
setproctitle("%s", device_file);
+#endif
/* cam_open_device() fails unless we use O_RDWR */
cam = cam_open_device(device_file, O_RDWR);
--- a/hald/freebsd/probing/probe-volume.c
+++ b/hald/freebsd/probing/probe-volume.c
@@ -39,7 +39,7 @@
#include <sys/types.h>
#include <isofs/cd9660/iso.h>
#include <glib.h>
-#include <libvolume_id.h>
+#include <blkid.h>
#include "libhal/libhal.h"
@@ -59,7 +59,7 @@
};
#define ISO_PATH_TABLE_ENTRY_SIZE 8
-#if __FreeBSD_version < 600101
+#if (__FreeBSD_version < 600101) && (__FreeBSD_kernel_version < 600101)
static uint32_t
isonum_731(unsigned char *p)
{
@@ -98,19 +98,20 @@
}
static char *
-hf_probe_volume_get_label (const struct volume_id *vid)
+hf_probe_volume_get_label (const blkid_probe pr)
{
- char *label = NULL;
+ const char *label;
+ char *volume_label = NULL;
- if (vid && *vid->label)
+ if (blkid_probe_lookup_value(pr, "LABEL", &label, NULL) == 0)
{
- if (g_utf8_validate(vid->label, -1, NULL))
- label = g_strdup(vid->label);
+ if (g_utf8_validate(label, -1, NULL))
+ volume_label = g_strdup(label);
else /* assume ISO8859-1 */
- label = g_convert(vid->label, -1, "UTF-8", "ISO8859-1", NULL, NULL, NULL);
+ volume_label = g_convert(label, -1, "UTF-8", "ISO8859-1", NULL, NULL, NULL);
}
- return label;
+ return volume_label;
}
static void
@@ -316,7 +317,7 @@
char *grandparent_udi;
char *parent_drive_type;
int fd = -1;
- struct volume_id *vid = NULL;
+ blkid_probe pr;
int ret = 1;
gboolean has_children;
gboolean is_swap;
@@ -326,7 +327,10 @@
gboolean has_data = FALSE;
gboolean is_blank = FALSE;
const char *usage;
- char *label;
+ const char *type;
+ const char *type_version;
+ const char *label;
+ const char *uuid;
unsigned int sector_size = 0;
off_t media_size = 0;
@@ -342,7 +346,9 @@
goto end;
/* give a meaningful process title for ps(1) */
+#ifndef __GLIBC__
setproctitle("%s", device_file);
+#endif
has_children = hfp_getenv_bool("HF_HAS_CHILDREN");
is_swap = hfp_getenv_bool("HF_IS_SWAP");
@@ -379,21 +385,28 @@
*/
if (! has_children && ! (is_cdrom && ! has_data))
{
- vid = volume_id_open_fd(fd);
- if (vid)
- {
- if (volume_id_probe_all(vid, 0, media_size) == 0)
- has_data = TRUE;
- else
- {
- volume_id_close(vid);
- vid = NULL;
- }
- }
+ pr = blkid_new_probe ();
+ if (pr != NULL)
+ {
+ int bid_ret;
+
+ blkid_probe_set_request (pr, BLKID_PROBREQ_LABEL | BLKID_PROBREQ_UUID |
+ BLKID_PROBREQ_TYPE | BLKID_PROBREQ_SECTYPE |
+ BLKID_PROBREQ_USAGE | BLKID_PROBREQ_VERSION);
+
+ bid_ret = blkid_probe_set_device (pr, fd, 0, media_size);
+ if (bid_ret == 0)
+ {
+ bid_ret = blkid_do_safeprobe (pr);
+ hfp_warning ("blkid_do_safeprobe returned an error");
+ }
+ if (bid_ret == 0)
+ has_data = TRUE;
+ }
}
if (! has_children && ! is_swap && ! has_audio && ! has_data && ! is_blank)
- goto end;
+ goto end_free;
libhal_device_add_capability(hfp_ctx, hfp_udi, "volume", &hfp_error);
if (is_cdrom)
@@ -559,28 +572,24 @@
usage = "partitiontable";
else if (is_swap)
usage = "other";
- else
- switch (vid ? vid->usage_id : (enum volume_id_usage) -1)
- {
- case VOLUME_ID_FILESYSTEM: usage = "filesystem"; break;
- case VOLUME_ID_DISKLABEL: usage = "disklabel"; break;
- case VOLUME_ID_OTHER: usage = "other"; break;
- case VOLUME_ID_RAID: usage = "raid"; break;
- case VOLUME_ID_CRYPTO: usage = "crypto"; break;
- case VOLUME_ID_UNUSED: usage = "unused"; break;
- default: usage = "unknown"; break;
- }
-
+ else if (blkid_probe_lookup_value(pr, "USAGE", &usage, NULL))
+ usage = "";
libhal_device_set_property_string(hfp_ctx, hfp_udi, "volume.fsusage", usage, &hfp_error);
- libhal_device_set_property_string(hfp_ctx, hfp_udi, "volume.fstype", vid ? vid->type: "", &hfp_error);
- if (vid && *vid->type_version)
- libhal_device_set_property_string(hfp_ctx, hfp_udi, "volume.fsversion", vid->type_version, &hfp_error);
- label = hf_probe_volume_get_label(vid);
+ if (blkid_probe_lookup_value(pr, "TYPE", &type, NULL))
+ type = "";
+ libhal_device_set_property_string(hfp_ctx, hfp_udi, "volume.fstype", type, &hfp_error);
+ if (blkid_probe_lookup_value(pr, "VERSION", &type, NULL))
+ type_version = "";
+ libhal_device_set_property_string(hfp_ctx, hfp_udi, "volume.fsversion", type_version, &hfp_error);
+
+ label = hf_probe_volume_get_label(pr);
libhal_device_set_property_string(hfp_ctx, hfp_udi, "volume.label", label ? label : "", &hfp_error);
g_free(label);
- libhal_device_set_property_string(hfp_ctx, hfp_udi, "volume.uuid", vid ? vid->uuid : "", &hfp_error);
+ if (blkid_probe_lookup_value(pr, "UUID", &uuid, NULL))
+ uuid = "";
+ libhal_device_set_property_string(hfp_ctx, hfp_udi, "volume.uuid", uuid, &hfp_error);
ioctl(fd, DIOCGSECTORSIZE, §or_size);
@@ -593,6 +602,9 @@
ret = 0; /* is a volume */
+ end_free:
+ blkid_free_probe (pr);
+
end:
return ret;
}
--- a/hald/freebsd/hf-computer.c
+++ b/hald/freebsd/hf-computer.c
@@ -133,11 +133,11 @@
if (PACKAGE_VERSION) {
int major, minor, micro;
- hal_device_property_set_string (root, "org.freedesktop.Hal.version", PACKAGE_VERSION);
+ hal_device_property_set_string (device, "org.freedesktop.Hal.version", PACKAGE_VERSION);
if ( sscanf( PACKAGE_VERSION, "%d.%d.%d", &major, &minor, µ ) == 3 ) {
- hal_device_property_set_int (root, "org.freedesktop.Hal.version.major", major);
- hal_device_property_set_int (root, "org.freedesktop.Hal.version.minor", minor);
- hal_device_property_set_int (root, "org.freedesktop.Hal.version.micro", micro);
+ hal_device_property_set_int (device, "org.freedesktop.Hal.version.major", major);
+ hal_device_property_set_int (device, "org.freedesktop.Hal.version.minor", minor);
+ hal_device_property_set_int (device, "org.freedesktop.Hal.version.micro", micro);
}
}
--- a/hald/freebsd/hf-util.c
+++ b/hald/freebsd/hf-util.c
@@ -326,24 +326,31 @@
void
hf_device_set_input (HalDevice *device,
- const char *class,
+ const char *capability1,
+ const char *capability2,
const char *devname)
{
g_return_if_fail(HAL_IS_DEVICE(device));
hal_device_add_capability(device, "input");
+ if (capability1)
+ {
+ char *capability;
- if (class)
+ capability = g_strdup_printf("input.%s", capability1);
+ hal_device_add_capability(device, capability);
+ g_free(capability);
+ }
+ if (capability2)
{
- char *category;
+ char *capability;
- category = g_strdup_printf("input.%s", class);
- hal_device_property_set_string(device, "info.category", category);
- hal_device_add_capability(device, category);
- g_free(category);
+ capability = g_strdup_printf("input.%s", capability2);
+ hal_device_add_capability(device, capability);
+ g_free(capability);
}
- else
- hal_device_property_set_string(device, "info.category", "input");
+
+ hal_device_property_set_string(device, "info.category", "input");
if (devname)
hf_device_property_set_string_printf(device, "input.device", "/dev/%s", devname);
--- a/hald/freebsd/hf-usb.c
+++ b/hald/freebsd/hf-usb.c
@@ -424,9 +424,9 @@
hf_devtree_device_set_name(device, di->udi_devnames[0]);
if ((devname = hf_usb_get_devname(di, "ukbd"))) /* USB keyboard */
- hf_device_set_input(device, "keyboard", devname);
+ hf_device_set_input(device, "keyboard", "keys", devname);
else if ((devname = hf_usb_get_devname(di, "ums"))) /* USB mouse */
- hf_device_set_input(device, "mouse", devname);
+ hf_device_set_input(device, "mouse", NULL, devname);
else if ((devname = hf_usb_get_devname(di, "uhid"))) /* UHID device */
{
hal_device_property_set_string(device, "info.category", "hiddev");
--- a/hald/freebsd/hf-util.h
+++ b/hald/freebsd/hf-util.h
@@ -87,7 +87,8 @@
...) G_GNUC_PRINTF(3, 4);
void hf_device_set_input (HalDevice *device,
- const char *class,
+ const char *capability1,
+ const char *capability2,
const char *devname);
HalDevice *hf_device_store_get_parent (HalDeviceStore *store,
--- a/hald/freebsd/hf-devtree.c
+++ b/hald/freebsd/hf-devtree.c
@@ -186,7 +186,7 @@
static void
hf_devtree_atkbd_set_properties (HalDevice *device)
{
- hf_device_set_input(device, "keyboard", NULL);
+ hf_device_set_input(device, "keyboard", "keys", NULL);
}
static void
@@ -195,7 +195,7 @@
char *devname;
devname = hf_devtree_device_get_name(device);
- hf_device_set_input(device, "mouse", devname);
+ hf_device_set_input(device, "mouse", NULL, devname);
g_free(devname);
}
@@ -205,7 +205,7 @@
char *devname;
devname = hf_devtree_device_get_name(device);
- hf_device_set_input(device, "joystick", devname);
+ hf_device_set_input(device, "joystick", NULL, devname);
g_free(devname);
if (! hal_device_has_property(device, "info.product"))