1 #include "booleans.h"
2 
booleans_usage()3 void booleans_usage() {
4     fprintf(stderr, "\tbooleans\n");
5 }
6 
list_booleans(hashtab_key_t k,hashtab_datum_t d,void * args)7 static int list_booleans(hashtab_key_t k,
8                          __attribute__ ((unused)) hashtab_datum_t d,
9                          __attribute__ ((unused)) void *args)
10 {
11     const char *name = k;
12     printf("%s\n", name);
13     return 0;
14 }
15 
booleans_func(int argc,char ** argv,policydb_t * policydb)16 int booleans_func (int argc, __attribute__ ((unused)) char **argv, policydb_t *policydb) {
17     if (argc != 1) {
18         USAGE_ERROR = true;
19         return -1;
20     }
21     return hashtab_map(policydb->p_bools.table, list_booleans, NULL);
22 }
23