Re: Help with device drivers

2009-08-10 Thread Krassimir Slavchev
Hans Petter Selasky wrote: > On Monday 10 August 2009 13:39:31 Krassimir Slavchev wrote: >> If I try to open the device from userland with: >> fd = open("/dev/xxx0", O_RDWR) it fails because open() tries to open the >> device for reading first and then for writing. > > There is a bug in the code.

Tracing Wake on Lan problem?

2009-08-10 Thread Matthew Hagerty
Greetings, I'm trying to get the Wake on Lan feature working on a 7.2-release box. I have two Intel NIC's, a Pro/100 and Pro/1000 (82541PI). The Pro/100 worked great right from the start using the generic kernel and was detected by the fxp driver. Using the wol (from ports) on another box

device drivers (Krassimir Slavchev) REPLY fd = open("/dev/xxx0", O_RDWR)

2009-08-10 Thread Michelle Li
Hello Krassimir~ open() fails with [ENXIO]...or other? Please advise~ Regards m_li --- On Mon, 8/10/09, freebsd-hackers-requ...@freebsd.org wrote: From: freebsd-hackers-requ...@freebsd.org Subject: freebsd-hackers Digest, Vol 333, Issue 1 To: freebsd-hackers@freebsd.org Date: Monday, August

Re: How to signal a time zone change?

2009-08-10 Thread Brian Somers
On Fri, 7 Aug 2009 15:08:16 -0700 "Peter Steele" wrote: > >What's the value of the TZ environment variable for the C apps? You may > need to have them read the new value from somewhere, and then rerun > tzset(). > > The default value of the TZ environment variable is null. I just tried > passing

Re: Help with device drivers

2009-08-10 Thread Hans Petter Selasky
On Monday 10 August 2009 13:39:31 Krassimir Slavchev wrote: > If I try to open the device from userland with: > fd = open("/dev/xxx0", O_RDWR) it fails because open() tries to open the > device for reading first and then for writing. There is a bug in the code. If you open using read+write flags,

Help with device drivers

2009-08-10 Thread Krassimir Slavchev
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi All, Looking at sys/dev/usb/misc/ufm.c ... static int ufm_open(struct usb_fifo *dev, int fflags) { if ((fflags & (FWRITE | FREAD)) != (FWRITE | FREAD)) { return (EACCES); } return (0); } ... and sys/dev/usb