KEYS: Remove key_type::match in favour of overriding default by match_preparse

A previous patch added a ->match_preparse() method to the key type.  This is
allowed to override the function called by the iteration algorithm.
Therefore, we can just set a default that simply checks for an exact match of
the key description with the original criterion data and allow match_preparse
to override it as needed.

The key_type::match op is then redundant and can be removed, as can the
user_match() function.

Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
This commit is contained in:
David Howells
2014-09-16 17:36:06 +01:00
parent 614d8c3901
commit c06cfb08b8
19 changed files with 31 additions and 45 deletions

View File

@@ -113,10 +113,6 @@ struct key_type {
*/
int (*match_preparse)(struct key_match_data *match_data);
/* match a key against a description */
int (*match)(const struct key *key,
const struct key_match_data *match_data);
/* Free preparsed match data (optional). This should be supplied it
* ->match_preparse() is supplied. */
void (*match_free)(struct key_match_data *match_data);