Coverage Report

Created: 2025-10-23 06:55

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/frr/zebra/zebra_vrf_clippy.c
Line
Count
Source
1
/* vrf_netns => "netns NAME$netns_name" */
2
DEFUN_CMD_FUNC_DECL(vrf_netns)
3
#define funcdecl_vrf_netns static int vrf_netns_magic(\
4
  const struct cmd_element *self __attribute__ ((unused)),\
5
  struct vty *vty __attribute__ ((unused)),\
6
  int argc __attribute__ ((unused)),\
7
  struct cmd_token *argv[] __attribute__ ((unused)),\
8
  const char * netns_name)
9
funcdecl_vrf_netns;
10
DEFUN_CMD_FUNC_TEXT(vrf_netns)
11
0
{
12
0
#if 1 /* anything to parse? */
13
0
  int _i;
14
#if 0 /* anything that can fail? */
15
  unsigned _fail = 0, _failcnt = 0;
16
#endif
17
0
  const char *netns_name = NULL;
18
19
0
  for (_i = 0; _i < argc; _i++) {
20
0
    if (!argv[_i]->varname)
21
0
      continue;
22
#if 0 /* anything that can fail? */
23
    _fail = 0;
24
#endif
25
26
0
    if (!strcmp(argv[_i]->varname, "netns_name")) {
27
0
      netns_name = (argv[_i]->type == WORD_TKN) ? argv[_i]->text : argv[_i]->arg;
28
0
    }
29
#if 0 /* anything that can fail? */
30
    if (_fail)
31
      vty_out (vty, "%% invalid input for %s: %s\n",
32
           argv[_i]->varname, argv[_i]->arg);
33
    _failcnt += _fail;
34
#endif
35
0
  }
36
#if 0 /* anything that can fail? */
37
  if (_failcnt)
38
    return CMD_WARNING;
39
#endif
40
0
#endif
41
0
  if (!netns_name) {
42
0
    vty_out(vty, "Internal CLI error [%s]\n", "netns_name");
43
0
    return CMD_WARNING;
44
0
  }
45
46
0
  return vrf_netns_magic(self, vty, argc, argv, netns_name);
47
0
}
48