From owner-freebsd-hardware Fri Aug 28 12:32:59 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id MAA06280 for freebsd-hardware-outgoing; Fri, 28 Aug 1998 12:32:59 -0700 (PDT) (envelope-from owner-freebsd-hardware@FreeBSD.ORG) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.95.76.54]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id MAA06255 for ; Fri, 28 Aug 1998 12:32:50 -0700 (PDT) (envelope-from kargl@troutmask.apl.washington.edu) Received: (from kargl@localhost) by troutmask.apl.washington.edu (8.9.1/8.8.8) id MAA13843 for freebsd-hardware@freebsd.org; Fri, 28 Aug 1998 12:35:59 -0700 (PDT) (envelope-from kargl) From: "Steven G. Kargl" Message-Id: <199808281935.MAA13843@troutmask.apl.washington.edu> Subject: new gpib driver and select/poll issues To: freebsd-hardware@FreeBSD.ORG Date: Fri, 28 Aug 1998 12:35:59 -0700 (PDT) X-Mailer: ELM [version 2.4ME+ PL43 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hardware@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Ladies and Gents, John Galbraith has been writing a new GPIB driver. His effort appears to be targeted at a 2.2.x system. I'm trying to make his stuff work under -current, and I have run into a problem with the use of poll versus select in -current. In particular, the changes in revision 1.34 of sys/sys/conf.h have eliminated d_select_t and noselect which John uses. The d_select_t can be replaced by d_poll_t, but does one do about the noselect. This snippet is the part of the code in question. /* device switch entry table */ struct cdevsw gp_cdevsw = { (d_open_t *) gp_open, /* open */ (d_close_t *) gp_close, /* close */ (d_read_t *) gp_read, /* read */ (d_write_t *) gp_write, /* write */ (d_ioctl_t *) gp_ioctl, /* ioctl */ (d_stop_t *) nullstop, /* stop */ (d_reset_t *) nullreset, /* reset (not used) */ (d_devtotty_t *) nodevtotty,/* ttys */ (d_select_t *) noselect, /* select */ (d_mmap_t *) nommap, /* mmap */ (d_strategy_t *) nostrategy,/* strategy */ (char*) "gp", /* name */ NULL, /* struct bdevsw* */ -1 /* GP_CDEV_MAJOR */ /* major number of driver */ }; Is this the proper way to support both -current and 2.2.x? #ifdef __FreeBSD__ >= 3 (d_poll_t *) nopoll, #else (d_select_t *) noselect; #endif -- Steve finger kargl@troutmask.apl.washington.edu http://troutmask.apl.washington.edu/~clesceri/kargl.html To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hardware" in the body of the message