[Toybox] Question for using toybuf in lspci

Kyungwan Han asura321 at gmail.com
Wed Jul 31 22:08:12 PDT 2013


Hi, felix

I'm reading lspci code, and I have a question about below code.

 25   struct {
 26     char class[16], vendor[16], device[16], module[256];
 27   } *bufs = (void*)(toybuf + 2);

Could I know why you use '*bufs = (void*)(toybuf + 2);' instead of '*bufs =
(void*)(toybuf);' ?

What does it mean '+2'?


Thanks.
Kyungwan Han.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20130801/50ba3173/attachment-0004.htm>


More information about the Toybox mailing list