Skip to contentSkip to conversation

getting node from path

DISCUSSION Jon Smirl 2 participants 2 messages Feb 4, 2004 – Feb 5, 2004

lore
Share & tools
lore

Jon Smirl

author
#0 lore raw

My program needs to convert the device path into a node name. What's the best way to do this?

The program resets the video hardware so it will run at early boot time. Is there a static udev library I can link to? Or should I exec this: udevinfo -r -q name -p /class/dri/card0. Will the exec work during early boot?

How do I make sure that udev has had a chance to create the node before I try using it? My driver will probably be compiled in so I will get my hotplug event very early.

==Jon Smirl
[email protected]

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. Try it!
http://webhosting.yahoo.com/ps/sb/

-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#1 lore raw
Quoted 6 lines · Jon Smirl

My program needs to convert the device path into a node name. What's the best way to do this?

The program resets the video hardware so it will run at early boot time. Is there a static udev library I can link to? Or should I exec this: udevinfo -r -q name -p /class/dri/card0. Will the exec work during early boot?

There is no static udev library right now. exec should work just fine during early boot.

Quoted 3 lines

How do I make sure that udev has had a chance to create the node before I try using it? My driver will probably be compiled in so I will get my hotplug event very early.

Look to see if it is there? Sleep until it shows up?

thanks,

greg k-h

-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel