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>
next in thread | previous in thread | raw e-mail | index | archive | help
Thank you. The thing is one of the input arguments of this function is devi= ce_t. How can I get this struct by device name so I can pass it to pci_get_= vpd_readonly function?=0AConsider that I'm trying to read em's vpd, how can= get em's related device_t struct by it's name?=A0=0ASomething like:=0Adevi= ce_t get_device_by_name(char dev_name)=0A=0A=0A=0AOn Monday, January 13, 20= 14 11:49 PM, John Baldwin <jhb@freebsd.org> wrote:=0A =0AOn Sunday, January= 12, 2014 3:32:25 am Nomad Esst wrote:=0A>> Hi list=0A>> Any experiences on= how to do so? Please tell me if you know how can I do =0A>that?=0A>=0A>The= re are methods available to query VPD data in dev/pci/pcivar.h if the=0A>se= rial number is stored in VPD (specifically you can call =0A>pci_get_vpd_rea= donly()).=0A>=0A>-- =0A>John Baldwin=0A>___________________________________= ____________=0A>freebsd-hackers@freebsd.org mailing list=0A>http://lists.fr= eebsd.org/mailman/listinfo/freebsd-hackers=0A>=0A>To unsubscribe, send any = mail to "freebsd-hackers-unsubscribe@freebsd.org=0A>"=0A>=0A>=0A>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1389678825.62302.YahooMailNeo>