mirror of
https://github.com/clearlinux/systemd-stable.git
synced 2026-09-01 11:16:00 +00:00
hwdb: FOREACH_HWDB_PROPERTY -> SD_HWDB_FOREACH_PROPERTY
Lets not pollute the global namespace. Prefix all our exported names and macros with SD_HWDB_*.
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user