[systemd-commits] src/libudev src/systemd
David Herrmann
dvdhrm at kemper.freedesktop.org
Fri Dec 12 00:31:53 PST 2014
src/libudev/libudev-hwdb.c | 2 +-
src/systemd/sd-hwdb.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 0b9315719154fa7ea1a075e1b3785713f5acc3a1
Author: David Herrmann <dh.herrmann at gmail.com>
Date: Fri Dec 12 09:30:50 2014 +0100
hwdb: FOREACH_HWDB_PROPERTY -> SD_HWDB_FOREACH_PROPERTY
Lets not pollute the global namespace. Prefix all our exported names and
macros with SD_HWDB_*.
diff --git a/src/libudev/libudev-hwdb.c b/src/libudev/libudev-hwdb.c
index 7a21b3d..2e198f2 100644
--- a/src/libudev/libudev-hwdb.c
+++ b/src/libudev/libudev-hwdb.c
@@ -140,7 +140,7 @@ _public_ struct udev_list_entry *udev_hwdb_get_properties_list_entry(struct udev
udev_list_cleanup(&hwdb->properties_list);
- FOREACH_HWDB_PROPERTY(hwdb->hwdb, modalias, key, value) {
+ SD_HWDB_FOREACH_PROPERTY(hwdb->hwdb, modalias, key, value) {
if (udev_list_entry_add(&hwdb->properties_list, key, value) == NULL) {
errno = ENOMEM;
return NULL;
diff --git a/src/systemd/sd-hwdb.h b/src/systemd/sd-hwdb.h
index fae9b9f..f41555d 100644
--- a/src/systemd/sd-hwdb.h
+++ b/src/systemd/sd-hwdb.h
@@ -39,7 +39,7 @@ int sd_hwdb_get(sd_hwdb *hwdb, const char *modalias, const char *key, const char
int sd_hwdb_seek(sd_hwdb *hwdb, const char *modalias);
int sd_hwdb_enumerate(sd_hwdb *hwdb, const char **key, const char **value);
-#define FOREACH_HWDB_PROPERTY(hwdb, modalias, key, value) \
+#define SD_HWDB_FOREACH_PROPERTY(hwdb, modalias, key, value) \
if (sd_hwdb_seek(hwdb, modalias) >= 0) \
while (sd_hwdb_enumerate(hwdb, &(key), &(value)) > 0)
More information about the systemd-commits
mailing list