On Mon, Apr 06, 2015 at 03:31:49PM -0600, Andreas Dilger wrote: > > +/** > > + * ext4_to_hex() - Converts to hexadecimal characters > > + * @dst: Buffer to take hex character representation of contents of > > + * src. Must be at least of size (src_size * 2). > > + * @src: Buffer to be converted to a hex string respresentation. > > + * @src_size: Number of bytes to convert. > > + */ > > +void ext4_to_hex(char *dst, char *src, size_t src_size) > > +{ > > + int x; > > + > > + for (x = 0; x < src_size; x++) > > + sprintf(&dst[x * 2], "%.2x", (unsigned char)src[x]); > > +} > > I think there is already some code in printk() to handle this? Looking > at vsnprintf->hex_string() it looks like "%*ph" would print out up to 64 > bytes as hex. As it turns out we're not even using ext4_to_hex() any more, so we can even more simply just delete this whole function. :-) - Ted -- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html