LCOV - code coverage report
Current view: top level - shared - tomoyo-util.c (source / functions) Hit Total Coverage
Test: main_coverage.info Lines: 5 5 100.0 %
Date: 2019-08-22 15:41:25 Functions: 1 1 100.0 %

          Line data    Source code
       1             : /* SPDX-License-Identifier: LGPL-2.1+ */
       2             : 
       3             : #include <unistd.h>
       4             : 
       5             : #include "tomoyo-util.h"
       6             : 
       7           3 : bool mac_tomoyo_use(void) {
       8             :         static int cached_use = -1;
       9             : 
      10           3 :         if (cached_use < 0)
      11           1 :                 cached_use = (access("/sys/kernel/security/tomoyo/version",
      12           1 :                                      F_OK) == 0);
      13             : 
      14           3 :         return cached_use;
      15             : }

Generated by: LCOV version 1.14