hal: Branch 'master' - 3 commits
Rob Taylor
robtaylor at kemper.freedesktop.org
Mon Mar 5 09:17:48 PST 2007
.gitignore | 4 +++-
configure.in | 22 ++++++++++++++++------
doc/spec/hal-spec-fdi-files.xml | 6 ++++++
fdi/fdi.dtd | 1 +
hald/create_cache.c | 2 ++
hald/device_info.c | 13 +++++++++++++
hald/rule.h | 1 +
7 files changed, 42 insertions(+), 7 deletions(-)
New commits:
diff-tree f69a06d85817c1930ce0bbbae6ba6647633b9277 (from af17d3f405cbf8ca1166e7707aa20db690f88f42)
Author: Rob Taylor <rob.taylor at codethink.co.uk>
Date: Mon Mar 5 17:19:53 2007 +0000
add compare_ne to possible matchrules
Adds compare_ne attribute, which is like compare_lt but matches when
not equal.
diff --git a/doc/spec/hal-spec-fdi-files.xml b/doc/spec/hal-spec-fdi-files.xml
index 81656bc..4c6ce24 100644
--- a/doc/spec/hal-spec-fdi-files.xml
+++ b/doc/spec/hal-spec-fdi-files.xml
@@ -135,6 +135,12 @@
</listitem>
<listitem>
<para>
+ <literal>compare_ne</literal> - like <literal>compare_lt</literal>
+ but matches when not equal.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
<literal>contains</literal> - can only be used with string and
strlist (string list).
For a string key this matches when the property contains the given
diff --git a/fdi/fdi.dtd b/fdi/fdi.dtd
index 8a827f2..341f61a 100644
--- a/fdi/fdi.dtd
+++ b/fdi/fdi.dtd
@@ -28,6 +28,7 @@
compare_le CDATA #IMPLIED
compare_gt CDATA #IMPLIED
compare_ge CDATA #IMPLIED
+ compare_ne CDATA #IMPLIED
>
<!ELEMENT merge (#PCDATA) >
diff --git a/hald/create_cache.c b/hald/create_cache.c
index 48cd7a6..84dabae 100644
--- a/hald/create_cache.c
+++ b/hald/create_cache.c
@@ -132,6 +132,8 @@ get_match_type(const char *str)
return MATCH_COMPARE_GT;
if (strcmp (str, "compare_ge") == 0)
return MATCH_COMPARE_GE;
+ if (strcmp (str, "compare_ne") == 0)
+ return MATCH_COMPARE_NE;
return MATCH_UNKNOWN;
}
diff --git a/hald/device_info.c b/hald/device_info.c
index 9af22b6..09f6eb2 100644
--- a/hald/device_info.c
+++ b/hald/device_info.c
@@ -101,6 +101,8 @@ get_match_type_str (enum match_type type
return "compare_gt";
case MATCH_COMPARE_GE:
return "compare_ge";
+ case MATCH_COMPARE_NE:
+ return "compare_ne";
case MATCH_UNKNOWN:
return "unknown match type";
}
@@ -681,6 +683,17 @@ handle_match (struct rule *rule, HalDevi
return result >= 0;
}
+ case MATCH_COMPARE_NE:
+ {
+ dbus_int64_t result;
+
+ if (!match_compare_property (d, prop_to_check, value, &result))
+ return FALSE;
+ else
+ return result != 0;
+ }
+
+
default:
HAL_INFO(("match ERROR"));
return FALSE;
diff --git a/hald/rule.h b/hald/rule.h
index b0c8ed3..b375fa8 100644
--- a/hald/rule.h
+++ b/hald/rule.h
@@ -77,6 +77,7 @@ typedef enum {
MATCH_COMPARE_LE,
MATCH_COMPARE_GT,
MATCH_COMPARE_GE,
+ MATCH_COMPARE_NE,
MATCH_SIBLING_CONTAINS
} match_type;
diff-tree af17d3f405cbf8ca1166e7707aa20db690f88f42 (from 1858b05e8e93593707006571a6e1f17efecc043f)
Author: Rob Taylor <rob.taylor at codethink.co.uk>
Date: Tue Feb 27 18:57:19 2007 +0000
add option to build without libpci
Adds a configure option --without-pci to build without libpci.
diff --git a/configure.in b/configure.in
index ce51b01..3c53d43 100644
--- a/configure.in
+++ b/configure.in
@@ -336,12 +336,22 @@ else
AM_CONDITIONAL(HAVE_SMBIOS,false)
fi
-dnl Check for libpci
-AC_CHECK_HEADERS(pci/pci.h, [
- AC_CHECK_LIB(pci, pci_init, [
- USE_LIBPCI=yes; AM_CONDITIONAL(HAVE_LIBPCI,true)], [
- USE_LIBPCI=no; AM_CONDITIONAL(HAVE_LIBPCI,false)])], [
- USE_LIBPCI=no; AM_CONDITIONAL(HAVE_LIBPCI,false)])
+AC_ARG_WITH([libpci],
+ [AS_HELP_STRING([--without-libpci],
+ [Compile without pci support])],
+ [],
+ [with_libpci=yes])
+
+AS_IF([test "x$with_libpci" != xno],
+ [dnl Check for libpci
+ AC_CHECK_HEADERS([pci/pci.h], [
+ AC_CHECK_LIB(pci, pci_init, [
+ USE_LIBPCI=yes AM_CONDITIONAL(HAVE_LIBPCI, true)], [
+ USE_LIBPCI=no AM_CONDITIONAL(HAVE_LIBPCI, false)])], [
+ USE_LIBPCI=no AM_CONDITIONAL(HAVE_LIBPCI, false)])
+ ], [
+ USE_LIBPCI=no AM_CONDITIONAL(HAVE_LIBPCI, false)
+ ])
AC_ARG_WITH(backend, [ --with-backend=<name> backend to use (linux/solaris/freebsd/dummy)],
[
diff-tree 1858b05e8e93593707006571a6e1f17efecc043f (from abae38633af21ef4a2f784f9cd6de3c9247c3e1c)
Author: Rob Taylor <rob.taylor at codethink.co.uk>
Date: Mon Mar 5 17:16:29 2007 +0000
ignore *.py[oc] and *.gcno
Ignore *.py[oc] and *.gcno
diff --git a/.gitignore b/.gitignore
index 59e3000..2e93e50 100644
--- a/.gitignore
+++ b/.gitignore
@@ -33,4 +33,6 @@ INSTALL
*.o
*.tar.gz
*~
-
+*.pyo
+*.pyc
+*.gcno
More information about the hal-commit
mailing list