A unset bitmask leads to the candidate selection always return no
candidate, even if there is one.
To select a better candidate regardless of it's classification, provide
a bitmask containing all selection criteria.
Signed-off-by: David Bauer <mail@david-bauer.net>
UEV_SELECT_REASON_LOAD,
};
+#define UEV_SELECT_REASON_ALL ((1 << UEV_SELECT_REASON_NUM_ASSOC) | (1 << UEV_SELECT_REASON_SIGNAL) | (1 << UEV_SELECT_REASON_LOAD))
+
struct uevent {
enum uevent_type type;
enum uevent_reason reason;
goto out;
}
- if (!find_better_candidate(si, &ev, 0))
+ if (!find_better_candidate(si, &ev, UEV_SELECT_REASON_ALL))
goto out;
ev.reason = UEV_REASON_BETTER_CANDIDATE;