summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Stakenvicius <axs@gentoo.org>2013-01-04 19:11:01 -0500
committerAnthony G. Basile <blueness@gentoo.org>2013-01-07 12:20:54 -0500
commit5f1d6a94ca9b9d4235c2ec8d8f3236f3b8b5fee1 (patch)
treee72ed88d089b82cc676159b6f57d51f7f00af2cd
parentc18029abe93784928a4aab040f5f351c8c6abac3 (diff)
The only functional changes in systemd-udev-196
As far as I can tell these are the only functional changes between the current eudev codebase and the codebase of systemd-196, in relation to udev hwdb code. There are some code style differences, and a number of error-trap-and-log lines that are not present, but that's about it Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
-rw-r--r--src/libudev/libudev-hwdb.c2
-rw-r--r--src/udev/udev-builtin-hwdb.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/libudev/libudev-hwdb.c b/src/libudev/libudev-hwdb.c
index 7521942eff..9906accf64 100644
--- a/src/libudev/libudev-hwdb.c
+++ b/src/libudev/libudev-hwdb.c
@@ -377,7 +377,7 @@ bool udev_hwdb_validate(struct udev_hwdb *hwdb) {
_public_ struct udev_list_entry *udev_hwdb_get_properties_list_entry(struct udev_hwdb *hwdb, const char *modalias, unsigned int flags) {
int err;
- if (!hwdb->f) {
+ if (!hwdb || !hwdb->f) {
errno = EINVAL;
return NULL;
}
diff --git a/src/udev/udev-builtin-hwdb.c b/src/udev/udev-builtin-hwdb.c
index 3004af0e1c..0b35d799fe 100644
--- a/src/udev/udev-builtin-hwdb.c
+++ b/src/udev/udev-builtin-hwdb.c
@@ -34,7 +34,7 @@ int udev_builtin_hwdb_lookup(struct udev_device *dev, const char *modalias, bool
int n = 0;
if (!hwdb)
- return EXIT_FAILURE;
+ return -ENOENT;
udev_list_entry_foreach(entry, udev_hwdb_get_properties_list_entry(hwdb, modalias, 0)) {
if (udev_builtin_add_property(dev, test,