Coverage Report

Created: 2025-07-11 06:18

/src/util-linux/include/mangle.h
Line
Count
Source (jump to first uncovered line)
1
/*
2
 * No copyright is claimed.  This code is in the public domain; do with
3
 * it what you wish.
4
 */
5
#ifndef UTIL_LINUX_MANGLE_H
6
#define UTIL_LINUX_MANGLE_H
7
8
/*
9
 * Functions for \oct encoding used in mtab/fstab/swaps/etc.
10
 */
11
12
extern char *mangle(const char *s);
13
14
extern void unmangle_to_buffer(const char *s, char *buf, size_t len);
15
extern size_t unhexmangle_to_buffer(const char *s, char *buf, size_t len);
16
extern size_t unescape_to_buffer(const char *s, const char *wanted, char *buf, size_t len);
17
18
extern char *unmangle(const char *s, const char **end);
19
20
static inline void unmangle_string(char *s)
21
0
{
22
0
  if (s)
23
0
    unmangle_to_buffer(s, s, strlen(s) + 1);
24
0
}
Unexecuted instantiation: tab_parse.c:unmangle_string
Unexecuted instantiation: utils.c:unmangle_string
Unexecuted instantiation: mangle.c:unmangle_string
Unexecuted instantiation: fs_statmount.c:unmangle_string
Unexecuted instantiation: script.c:unmangle_string
25
26
static inline void unhexmangle_string(char *s)
27
924
{
28
924
  if (s)
29
924
    unhexmangle_to_buffer(s, s, strlen(s) + 1);
30
924
}
Unexecuted instantiation: tab_parse.c:unhexmangle_string
Unexecuted instantiation: utils.c:unhexmangle_string
Unexecuted instantiation: mangle.c:unhexmangle_string
Unexecuted instantiation: fs_statmount.c:unhexmangle_string
script.c:unhexmangle_string
Line
Count
Source
27
924
{
28
924
  if (s)
29
924
    unhexmangle_to_buffer(s, s, strlen(s) + 1);
30
924
}
31
32
static inline void unescape_string(char *s, const char *wanted)
33
0
{
34
0
  if (s)
35
0
    unescape_to_buffer(s, wanted, s, strlen(s) + 1);
36
0
}
Unexecuted instantiation: tab_parse.c:unescape_string
Unexecuted instantiation: utils.c:unescape_string
Unexecuted instantiation: mangle.c:unescape_string
Unexecuted instantiation: fs_statmount.c:unescape_string
Unexecuted instantiation: script.c:unescape_string
37
38
#endif /* UTIL_LINUX_MANGLE_H */
39