Re: [PATCH 5/5] In verbose mode, display contents of VPD if possible

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

 



Hello!

> How about:
> 
> static void print_vpd_string(const u8 *buf, size_t len)
> {
>   while (len--)
>     {
>       unsigned char ch = *buf++;
>       if (ch == '\\')
>         printf("\\\\");
>       else if (ch < 32 || ch == 127)
>         printf("\\x%02x", ch);
>       else
>         putchar(ch);
>     }
> }

Yes, that's fine.

				Have a nice fortnight
-- 
Martin `MJ' Mares                          <mj@xxxxxx>   http://mj.ucw.cz/
Faculty of Math and Physics, Charles University, Prague, Czech Rep., Earth
"A semicolon. Another line ends in the dance of camel." -- Kabir Ahuja
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux