blkid_encode_string ()
int
blkid_encode_string (const char *str
,
char *str_enc
,
size_t len
);
Encode all potentially unsafe characters of a string to the
corresponding hex value prefixed by '\x'.
Returns
0 if the entire string was copied, non-zero otherwise.
blkid_safe_string ()
int
blkid_safe_string (const char *str
,
char *str_safe
,
size_t len
);
Processing whitespace characters. Allows valid ascii,valid utf8.
Replace everything else with'_'
Returns
0 on success or -1 in case of error.