At Sun, 18 Sep 2005 03:04:15 -0700 (PDT), Shakthi Kannan wrote: > I have a simple test function on GNU Hurd that > > 1. gets_privileged_ports from device_t > > error_t err; > device_t device_master; > err = get_privileged_ports (0, &device_master); > > 2. calls device_open > > err = device_open (device_master, D_READ | D_WRITE, > "lpr", &lpr_dev);
My impression is that the fourth argument to device_open is a send right to the device... > > But, when I try to do device_read, it doesn't print > message in the device_read function in > gnumach-1-branch/i386/i386at/lpr.c > > 3. calling device_read > > unsigned long result; > mach_msg_type_number_t data_cnt = sizeof (result); > err = device_read (device_master, 0, -1, sizeof > (result), (void *) &result, &data_cnt); ... which is supplied as the first argument to device_read et al. The device master port is a meta-device which is used to obtain send rights to other devices. Also, make sure that you add your lprread function to the lpr device structure (i.e. along side lpropen). _______________________________________________ Bug-hurd mailing list Bug-hurd@gnu.org http://lists.gnu.org/mailman/listinfo/bug-hurd