Re: [PATCH v4 1/4] btrfs-progs: utils: Introduce function to escape characters

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Nov 08, 2016 at 08:33:25AM +0800, Qu Wenruo wrote:
> While still some small comment.
> +                         if (!isprint(c)) {
> +                                 printf("\\%c%c%c",
> +                                                 '0' + ((c & 0300) >> 6),
> +                                                 '0' + ((c & 070) >> 3),
> +                                                 '0' + (c & 07));
> 
> For non-printable chars, isn't it more common to print it as hex other 
> than octal?

Ok, hex would be better.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux