summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2014-09-16 17:36:08 +0100
committerDavid Howells <dhowells@redhat.com>2014-09-16 17:36:08 +0100
commit0c903ab64feb0fe83eac9f67a06e2f5b9508de16 (patch)
tree809464ff50aa99c1caaf650230fea4f30ef8138c /include/linux
parentc06cfb08b88dfbe13be44a69ae2fdc3a7c902d81 (diff)
downloadlinux-rpi3-0c903ab64feb0fe83eac9f67a06e2f5b9508de16.tar.gz
linux-rpi3-0c903ab64feb0fe83eac9f67a06e2f5b9508de16.tar.bz2
linux-rpi3-0c903ab64feb0fe83eac9f67a06e2f5b9508de16.zip
KEYS: Make the key matching functions return bool
Make the key matching functions pointed to by key_match_data::cmp return bool rather than int. Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: Vivek Goyal <vgoyal@redhat.com>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/key-type.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/include/linux/key-type.h b/include/linux/key-type.h
index c14816bd3b44..ff9f1d394235 100644
--- a/include/linux/key-type.h
+++ b/include/linux/key-type.h
@@ -56,10 +56,12 @@ typedef int (*request_key_actor_t)(struct key_construction *key,
* Preparsed matching criterion.
*/
struct key_match_data {
- /* Comparison function, defaults to type->match, but can be replaced by
- * type->match_preparse(). */
- int (*cmp)(const struct key *key,
- const struct key_match_data *match_data);
+ /* Comparison function, defaults to exact description match, but can be
+ * overridden by type->match_preparse(). Should return true if a match
+ * is found and false if not.
+ */
+ bool (*cmp)(const struct key *key,
+ const struct key_match_data *match_data);
const void *raw_data; /* Raw match data */
void *preparsed; /* For ->match_preparse() to stash stuff */