Date: Mon, 13 Jan 2014 21:53:45 -0800 (PST) From: Nomad Esst <noname.esst@yahoo.com> To: John Baldwin <jhb@freebsd.org>, "freebsd-drivers@freebsd.org" <freebsd-drivers@freebsd.org> Subject: Re: Access pci devices' serial numbers programmatically Message-ID: <1389678825.62302.YahooMailNeo@web162702.mail.bf1.yahoo.com> In-Reply-To: <201401131349.06456.jhb@freebsd.org> References: <1389515545.51283.YahooMailNeo@web162704.mail.bf1.yahoo.com> <201401131349.06456.jhb@freebsd.org>
index | next in thread | previous in thread | raw e-mail
Thank you. The thing is one of the input arguments of this function is device_t. How can I get this struct by device name so I can pass it to pci_get_vpd_readonly function? Consider that I'm trying to read em's vpd, how can get em's related device_t struct by it's name? Something like: device_t get_device_by_name(char dev_name) On Monday, January 13, 2014 11:49 PM, John Baldwin <jhb@freebsd.org> wrote: On Sunday, January 12, 2014 3:32:25 am Nomad Esst wrote: >> Hi list >> Any experiences on how to do so? Please tell me if you know how can I do >that? > >There are methods available to query VPD data in dev/pci/pcivar.h if the >serial number is stored in VPD (specifically you can call >pci_get_vpd_readonly()). > >-- >John Baldwin >_______________________________________________ >freebsd-hackers@freebsd.org mailing list >http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > >To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org >" > > >help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1389678825.62302.YahooMailNeo>
