]>
Commit | Line | Data |
---|---|---|
21169393 KZ |
1 | #ifndef UTIL_LINUX_MANGLE_H |
2 | #define UTIL_LINUX_MANGLE_H | |
3 | ||
4 | /* | |
5 | * Functions for \oct encoding used in mtab/fstab/swaps/etc. | |
6 | */ | |
7 | ||
8 | extern char *mangle(const char *s); | |
9 | ||
3c5e4ef8 | 10 | extern void unmangle_to_buffer(const char *s, char *buf, size_t len); |
61b92339 | 11 | extern size_t unhexmangle_to_buffer(const char *s, char *buf, size_t len); |
95387b66 | 12 | |
78c66fc6 | 13 | extern char *unmangle(const char *s, const char **end); |
21169393 | 14 | |
8f3f6383 KZ |
15 | static inline void unmangle_string(char *s) |
16 | { | |
17 | unmangle_to_buffer(s, s, strlen(s) + 1); | |
18 | } | |
19 | ||
95387b66 KZ |
20 | static inline void unhexmangle_string(char *s) |
21 | { | |
22 | unhexmangle_to_buffer(s, s, strlen(s) + 1); | |
23 | } | |
24 | ||
21169393 KZ |
25 | #endif /* UTIL_LINUX_MANGLE_H */ |
26 |