about summary refs log tree commit diff
path: root/Src/Modules/cap.c
diff options
context:
space:
mode:
Diffstat (limited to 'Src/Modules/cap.c')
-rw-r--r--Src/Modules/cap.c30
1 files changed, 26 insertions, 4 deletions
diff --git a/Src/Modules/cap.c b/Src/Modules/cap.c
index 875b8c4e5..2886c42b4 100644
--- a/Src/Modules/cap.c
+++ b/Src/Modules/cap.c
@@ -122,6 +122,14 @@ static struct builtin bintab[] = {
     BUILTIN("setcap", 0, bin_setcap, 2, -1, 0, NULL, NULL),
 };
 
+static struct features module_features = {
+    bintab, sizeof(bintab)/sizeof(*bintab),
+    NULL, 0,
+    NULL, 0,
+    NULL, 0,
+    0
+};
+
 /**/
 int
 setup_(UNUSED(Module m))
@@ -131,21 +139,35 @@ setup_(UNUSED(Module m))
 
 /**/
 int
-boot_(Module m)
+features_(Module m, char ***features)
 {
-    return !addbuiltins(m->nam, bintab, sizeof(bintab)/sizeof(*bintab));
+    *features = featuresarray(m->nam, &module_features);
+    return 0;
 }
 
 /**/
 int
-cleanup_(Module m)
+enables_(Module m, int **enables)
+{
+    return handlefeatures(m->nam, &module_features, enables);
+}
+
+/**/
+int
+boot_(UNUSED(Module m))
 {
-    deletebuiltins(m->nam, bintab, sizeof(bintab)/sizeof(*bintab));
     return 0;
 }
 
 /**/
 int
+cleanup_(Module m)
+{
+    return setfeatureenables(m->nam, &module_features, NULL);
+}
+
+/**/
+int
 finish_(UNUSED(Module m))
 {
     return 0;