forked from external/yambar
module/removables: log warning if action is something we didn't expect
This commit is contained in:
parent
410b7635d7
commit
a8a9ab28bd
1 changed files with 4 additions and 1 deletions
|
@ -350,7 +350,10 @@ handle_udev_event(struct module *mod, struct udev_device *dev)
|
|||
bool add = strcmp(action, "add") == 0;
|
||||
bool del = strcmp(action, "remove") == 0;
|
||||
|
||||
assert(add || del);
|
||||
if (!add && !del) {
|
||||
LOG_WARN("unhandled action: %s", action);
|
||||
return false;
|
||||
}
|
||||
|
||||
const char *devtype = udev_device_get_property_value(dev, "DEVTYPE");
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue