summaryrefslogtreecommitdiff
path: root/src/shared
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared')
-rw-r--r--src/shared/cap-list.c4
-rw-r--r--src/shared/cap-list.h1
2 files changed, 5 insertions, 0 deletions
diff --git a/src/shared/cap-list.c b/src/shared/cap-list.c
index 56d1488f48..8033e8c7b2 100644
--- a/src/shared/cap-list.c
+++ b/src/shared/cap-list.c
@@ -60,3 +60,7 @@ int capability_from_name(const char *name) {
return sc->id;
}
+
+int capability_list_length(void) {
+ return (int) ELEMENTSOF(capability_names);
+}
diff --git a/src/shared/cap-list.h b/src/shared/cap-list.h
index c699e466a7..9824fad70f 100644
--- a/src/shared/cap-list.h
+++ b/src/shared/cap-list.h
@@ -23,3 +23,4 @@
const char *capability_to_name(int id);
int capability_from_name(const char *name);
+int capability_list_length(void);