|
From: | Da Zheng |
Subject: | Re: Some questions about libports and notification of ports |
Date: | Tue, 26 Aug 2008 13:09:16 +0200 |
User-agent: | Thunderbird 2.0.0.16 (Macintosh/20080707) |
Thomas Bushnell BSG wrote:
The purpose of the translator is to help other programs get the port to the device, so I suggested if it was OK that file_name_lookup() returns the port to the device directly. antrik said it was quite confusing for him because file_name_lookup() should return a Hurd port, not a Mach port.The device file is created by a translator to help other user programs to open the device. For example, we can create a device file /dev/eth0 with the translator. When the user program calls file_name_lookup() on the file and device_open() as I do in the code, I actually open the device of eth0.So device_file here can be /dev/eth0, /dev/eth1, etc.You are opening that file as if you expect it to be there, and to return you a port you can do device_open on. That seems very confused to me.You call device_open on master device files.
Here are his suggestions. You can see them in the message: http://lists.gnu.org/archive/html/bug-hurd/2008-08/msg00005.htmlFew people gives suggestions, So antrik said I could use any design he suggested.
So what is your suggestion? Zheng Da
[Prev in Thread] | Current Thread | [Next in Thread] |