From e60683a0d553b6488c564863f4e48954944fb0f8 Mon Sep 17 00:00:00 2001 From: bigbiff bigbiff Date: Fri, 22 Feb 2013 20:55:50 -0500 Subject: use libblkid to get filesystem type we can now use libblkid to detect exfat --- libblkid/mangle.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 libblkid/mangle.h (limited to 'libblkid/mangle.h') diff --git a/libblkid/mangle.h b/libblkid/mangle.h new file mode 100644 index 000000000..ec492b556 --- /dev/null +++ b/libblkid/mangle.h @@ -0,0 +1,26 @@ +#ifndef UTIL_LINUX_MANGLE_H +#define UTIL_LINUX_MANGLE_H + +/* + * Functions for \oct encoding used in mtab/fstab/swaps/etc. + */ + +extern char *mangle(const char *s); + +extern void unmangle_to_buffer(const char *s, char *buf, size_t len); +void unhexmangle_to_buffer(const char *s, char *buf, size_t len); + +extern char *unmangle(const char *s, char **end); + +static inline void unmangle_string(char *s) +{ + unmangle_to_buffer(s, s, strlen(s) + 1); +} + +static inline void unhexmangle_string(char *s) +{ + unhexmangle_to_buffer(s, s, strlen(s) + 1); +} + +#endif /* UTIL_LINUX_MANGLE_H */ + -- cgit v1.2.3