LCOV - code coverage report
Current view: top level - strace_git - swapon.c (source / functions) Hit Total Coverage
Test: strace-4.16.0.69.f1ea-dirty Code Coverage Lines: 11 11 100.0 %
Date: 2017-03-18 00:38:52 Functions: 1 1 100.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 2 2 100.0 %

           Branch data     Line data    Source code
       1                 :            : #include "defs.h"
       2                 :            : 
       3                 :            : #include <sys/swap.h>
       4                 :            : 
       5                 :            : #include "xlat/swap_flags.h"
       6                 :            : 
       7                 :         30 : SYS_FUNC(swapon)
       8                 :            : {
       9                 :         30 :         unsigned int flags = tcp->u_arg[1];
      10                 :         30 :         unsigned int prio = flags & SWAP_FLAG_PRIO_MASK;
      11                 :         30 :         flags &= ~SWAP_FLAG_PRIO_MASK;
      12                 :            : 
      13                 :         30 :         printpath(tcp, tcp->u_arg[0]);
      14                 :         30 :         tprints(", ");
      15         [ +  + ]:         30 :         if (flags) {
      16                 :         18 :                 printflags(swap_flags, flags, "SWAP_FLAG_???");
      17                 :         18 :                 tprintf("|%u", prio);
      18                 :            :         } else {
      19                 :         12 :                 tprintf("%u", prio);
      20                 :            :         }
      21                 :            : 
      22                 :         30 :         return RVAL_DECODED;
      23                 :            : }

Generated by: LCOV version 1.12