rpms/hal/devel hal-0.5.10-set-property-direct.patch, NONE, 1.1 hal.spec, 1.146, 1.147
Adam Jackson (ajax)
fedora-extras-commits at redhat.com
Mon Mar 10 19:00:39 UTC 2008
Author: ajax
Update of /cvs/pkgs/rpms/hal/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv12437
Modified Files:
hal.spec
Added Files:
hal-0.5.10-set-property-direct.patch
Log Message:
* Mon Mar 10 2008 Adam Jackson <ajax at redhat.com> 0.5.11-0.git20080304.4
- hal-0.5.10-set-property-direct.patch: Add --direct option to
hal-set-property(1).
hal-0.5.10-set-property-direct.patch:
--- NEW FILE hal-0.5.10-set-property-direct.patch ---
diff -up hal-0.5.10/tools/hal_set_property.c.jx hal-0.5.10/tools/hal_set_property.c
--- hal-0.5.10/tools/hal_set_property.c.jx 2007-07-26 14:00:28.000000000 -0400
+++ hal-0.5.10/tools/hal_set_property.c 2008-03-10 14:22:58.000000000 -0400
@@ -66,7 +66,7 @@ usage (int argc, char *argv[])
" (--int <value> | --string <value> | --bool <value> |\n"
" --strlist-pre <value> | --strlist-post <value> |\n"
" --strlist-rem <value> | --double <value> | --remove)\n"
- " [--help] [--version]\n");
+ " [--direct] [--help] [--version]\n");
fprintf (stderr,
"\n" " --udi Unique Device Id\n"
" --key Key of the property to set\n"
@@ -81,6 +81,7 @@ usage (int argc, char *argv[])
" --strlist-post Append a string to a list\n"
" --strlist-rem Remove a string from a list\n"
" --remove Indicates that the property should be removed\n"
+ " --direct Use direct HAL connection\n"
" --version Show version and exit\n"
" --help Show this information and exit\n"
"\n"
@@ -114,6 +115,7 @@ main (int argc, char *argv[])
dbus_bool_t is_version = FALSE;
int type = PROP_INVALID;
DBusError error;
+ dbus_bool_t direct = FALSE;
if (argc <= 1) {
usage (argc, argv);
@@ -135,6 +137,7 @@ main (int argc, char *argv[])
{"strlist-pre", 1, NULL, 0},
{"strlist-post", 1, NULL, 0},
{"strlist-rem", 1, NULL, 0},
+ {"direct", 0, NULL, 0},
{"remove", 0, NULL, 0},
{"version", 0, NULL, 0},
{"help", 0, NULL, 0},
@@ -188,6 +191,8 @@ main (int argc, char *argv[])
type = PROP_STRLIST_REM;
} else if (strcmp (opt, "remove") == 0) {
remove = TRUE;
+ } else if (strcmp (opt, "direct") == 0) {
+ direct = TRUE;
} else if (strcmp (opt, "udi") == 0) {
udi = strdup (optarg);
} else if (strcmp (opt, "version") == 0) {
@@ -215,24 +220,32 @@ main (int argc, char *argv[])
fprintf (stderr, "\n");
- dbus_error_init (&error);
- if ((hal_ctx = libhal_ctx_new ()) == NULL) {
- fprintf (stderr, "error: libhal_ctx_new\n");
- return 1;
- }
- if (!libhal_ctx_set_dbus_connection (hal_ctx, dbus_bus_get (DBUS_BUS_SYSTEM, &error))) {
- fprintf (stderr, "error: libhal_ctx_set_dbus_connection: %s: %s\n", error.name, error.message);
- LIBHAL_FREE_DBUS_ERROR (&error);
- return 1;
- }
- if (!libhal_ctx_init (hal_ctx, &error)) {
- if (dbus_error_is_set(&error)) {
- fprintf (stderr, "error: libhal_ctx_init: %s: %s\n", error.name, error.message);
- dbus_error_free (&error);
+ dbus_error_init (&error);
+ if (direct) {
+ if ((hal_ctx = libhal_ctx_init_direct (&error)) == NULL) {
+ fprintf (stderr, "error: libhal_ctx_init_direct\n");
+ LIBHAL_FREE_DBUS_ERROR (&error);
+ return 1;
+ }
+ } else {
+ if ((hal_ctx = libhal_ctx_new ()) == NULL) {
+ fprintf (stderr, "error: libhal_ctx_new\n");
+ return 1;
+ }
+ if (!libhal_ctx_set_dbus_connection (hal_ctx, dbus_bus_get (DBUS_BUS_SYSTEM, &error))) {
+ fprintf (stderr, "error: libhal_ctx_set_dbus_connection: %s: %s\n", error.name, error.message);
+ LIBHAL_FREE_DBUS_ERROR (&error);
+ return 1;
+ }
+ if (!libhal_ctx_init (hal_ctx, &error)) {
+ if (dbus_error_is_set(&error)) {
+ fprintf (stderr, "error: libhal_ctx_init: %s: %s\n", error.name, error.message);
+ dbus_error_free (&error);
+ }
+ fprintf (stderr, "Could not initialise connection to hald.\n"
+ "Normally this means the HAL daemon (hald) is not running or not ready.\n");
+ return 1;
}
- fprintf (stderr, "Could not initialise connection to hald.\n"
- "Normally this means the HAL daemon (hald) is not running or not ready.\n");
- return 1;
}
if (remove) {
Index: hal.spec
===================================================================
RCS file: /cvs/pkgs/rpms/hal/devel/hal.spec,v
retrieving revision 1.146
retrieving revision 1.147
diff -u -r1.146 -r1.147
--- hal.spec 5 Mar 2008 16:19:57 -0000 1.146
+++ hal.spec 10 Mar 2008 19:00:05 -0000 1.147
@@ -26,10 +26,11 @@
Summary: Hardware Abstraction Layer
Name: hal
Version: 0.5.11
-Release: 0.git20080304.3%{?dist}
+Release: 0.git20080304.4%{?dist}
URL: http://www.freedesktop.org/Software/hal
Source0: http://hal.freedesktop.org/releases/%{name}-%{version}.git20080304.2.tar.gz
Patch0: hal-0.5.11-vio.patch
+Patch1: hal-0.5.10-set-property-direct.patch
License: AFL/GPL
Group: System Environment/Libraries
@@ -123,6 +124,7 @@
%prep
%setup -q
%patch0 -p1 -b .vio
+%patch1 -p1 -b .direct
%build
%configure --enable-docbook-docs --docdir=%{_datadir}/doc/%{name}-%{version} --with-os-type=redhat --enable-console-kit --enable-policy-kit --enable-acl-management --enable-umount-helper --enable-acpi-ibm --enable-acpi-toshiba --with-eject=/usr/sbin/eject
@@ -238,6 +240,10 @@
%{_datadir}/gtk-doc/html/libhal-storage/*
%changelog
+* Mon Mar 10 2008 Adam Jackson <ajax at redhat.com> 0.5.11-0.git20080304.4
+- hal-0.5.10-set-property-direct.patch: Add --direct option to
+ hal-set-property(1).
+
* Wed Mar 5 2008 David Zeuthen <davidz at redhat.com> - 0.5.11-0.git20080304.3%{?dist}
- vio support (#431045, thanks dwmw2)
More information about the fedora-extras-commits
mailing list