diff options
author | Tom Gundersen <teg@jklm.no> | 2015-04-17 13:50:10 +0200 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2015-04-17 14:15:47 +0200 |
commit | 19c9df44921bd4788bba608e9d0756f4fb1d5f89 (patch) | |
tree | 9e2f0087bbba6069e0264787ae074e8f8a9231c5 /src/libsystemd/sd-device | |
parent | c32eb440bab953a0169cd207dfef5cad16dfb340 (diff) |
sd-device: enumerator - don't expose add_device()
This is rarely, if ever, used. Drop it from the new public API and only keep it for
the legacy API.
Suggested by David Herrmann.
Diffstat (limited to 'src/libsystemd/sd-device')
-rw-r--r-- | src/libsystemd/sd-device/device-enumerator-private.h | 1 | ||||
-rw-r--r-- | src/libsystemd/sd-device/device-enumerator.c | 8 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/libsystemd/sd-device/device-enumerator-private.h b/src/libsystemd/sd-device/device-enumerator-private.h index 515a60da22..4d0a2d3c79 100644 --- a/src/libsystemd/sd-device/device-enumerator-private.h +++ b/src/libsystemd/sd-device/device-enumerator-private.h @@ -25,6 +25,7 @@ int device_enumerator_scan_devices(sd_device_enumerator *enumeartor); int device_enumerator_scan_subsystems(sd_device_enumerator *enumeartor); +int device_enumerator_add_device(sd_device_enumerator *enumerator, sd_device *device); sd_device *device_enumerator_get_first(sd_device_enumerator *enumerator); sd_device *device_enumerator_get_next(sd_device_enumerator *enumerator); diff --git a/src/libsystemd/sd-device/device-enumerator.c b/src/libsystemd/sd-device/device-enumerator.c index 37d46e57cf..eb637f5a57 100644 --- a/src/libsystemd/sd-device/device-enumerator.c +++ b/src/libsystemd/sd-device/device-enumerator.c @@ -317,7 +317,7 @@ static int device_compare(const void *_a, const void *_b) { return strcmp(devpath_a, devpath_b); } -_public_ int sd_device_enumerator_add_device(sd_device_enumerator *enumerator, sd_device *device) { +int device_enumerator_add_device(sd_device_enumerator *enumerator, sd_device *device) { int r; assert_return(enumerator, -EINVAL); @@ -544,7 +544,7 @@ static int enumerator_scan_dir_and_add_devices(sd_device_enumerator *enumerator, if (!match_sysattr(enumerator, device)) continue; - k = sd_device_enumerator_add_device(enumerator, device); + k = device_enumerator_add_device(enumerator, device); if (k < 0) r = k; } @@ -670,7 +670,7 @@ static int enumerator_scan_devices_tag(sd_device_enumerator *enumerator, const c if (!match_sysattr(enumerator, device)) continue; - k = sd_device_enumerator_add_device(enumerator, device); + k = device_enumerator_add_device(enumerator, device); if (k < 0) { r = k; continue; @@ -727,7 +727,7 @@ static int parent_add_child(sd_device_enumerator *enumerator, const char *path) if (!match_sysattr(enumerator, device)) return 0; - r = sd_device_enumerator_add_device(enumerator, device); + r = device_enumerator_add_device(enumerator, device); if (r < 0) return r; |