[PATCH] Ignore configuration also works for the removal of devices
Export this patch
---
main.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/main.c b/main.c
index 3dadda1..219c79d 100644
--- a/main.c
+++ b/main.c
@@ -237,6 +237,10 @@ next_device:
for (int idx = 0; idx < state.removed_devices->length; idx++) {
struct upower_device *device = state.removed_devices->items[idx];
+ if ((ignore_types_mask & (1 << device->type))) {
+ continue;
+ }
+
ret = send_remove(user_bus, device);
if (ret < 0) {
fprintf(stderr, "could not send device removal notification: %s\n", strerror(-ret));
--
2.43.2
Applied, thanks!