LCOV - code coverage report
Current view: top level - shared - daemon-util.h (source / functions) Hit Total Coverage
Test: systemd_full.info Lines: 4 8 50.0 %
Date: 2019-08-23 13:36:53 Functions: 1 2 50.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 1 4 25.0 %

           Branch data     Line data    Source code
       1                 :            : /* SPDX-License-Identifier: LGPL-2.1+ */
       2                 :            : #pragma once
       3                 :            : 
       4                 :            : #include <stdbool.h>
       5                 :            : 
       6                 :            : #include "sd-daemon.h"
       7                 :            : 
       8                 :            : #define NOTIFY_READY "READY=1\n" "STATUS=Processing requests..."
       9                 :            : #define NOTIFY_STOPPING "STOPPING=1\n" "STATUS=Shutting down..."
      10                 :            : 
      11                 :          0 : static inline const char *notify_start(const char *start, const char *stop) {
      12         [ #  # ]:          0 :         if (start)
      13                 :          0 :                 (void) sd_notify(false, start);
      14                 :            : 
      15                 :          0 :         return stop;
      16                 :            : }
      17                 :            : 
      18                 :            : /* This is intended to be used with _cleanup_ attribute. */
      19                 :         32 : static inline void notify_on_cleanup(const char **p) {
      20         [ +  - ]:         32 :         if (p)
      21                 :         32 :                 (void) sd_notify(false, *p);
      22                 :         32 : }

Generated by: LCOV version 1.14