From mboxrd@z Thu Jan 1 00:00:00 1970 From: Greg KH Date: Sat, 03 Jan 2004 02:21:40 +0000 Subject: Re: PCI config space Message-Id: <20040103022140.GA6896@kroah.com> List-Id: References: <20040102215557.97085.qmail@web14907.mail.yahoo.com> In-Reply-To: <20040102215557.97085.qmail@web14907.mail.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org On Fri, Jan 02, 2004 at 05:57:02PM -0800, Jon Smirl wrote: > --- Greg KH wrote: > > On Fri, Jan 02, 2004 at 05:03:20PM -0800, Jon Smirl wrote: > > > And I should use something like execl (seems to be in klibc) to call udev to > > > query for it's directory and my path? > > > > "my path"? What does that mean? > > My DEVPATH, /class/dri/card0 so that I can do: > udev -q /class/dri/card0 > and get the path to my device: > dri/card0 That is your device node that udev created, right? > and combine it with: > udev -r > which returns > /udev/ > > So that I can build the path to my device: > /udev/dri/card0 Yes, then you can do whatever operations on that device node you want to. But if you want to touch the PCI config stuff for your device, just go off of the DEVPATH. There should be a "device" symlink in your /class/dri/card0/ directory that points to the pci device directory, right? Anyway, it sounds like you are on the right path... thanks, greg k-h ------------------------------------------------------- This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id78&alloc_id371&op=click _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel