From owner-freebsd-stable Fri Jul 2 23:40: 0 1999 Delivered-To: freebsd-stable@freebsd.org Received: from gaia.euronet.nl (gaia.euronet.nl [194.134.0.10]) by hub.freebsd.org (Postfix) with ESMTP id 0832F14C03 for ; Fri, 2 Jul 1999 23:39:55 -0700 (PDT) (envelope-from marcel@scc.nl) Received: from scones.sup.scc.nl (i459.ztm.euronet.nl [194.134.67.180]) by gaia.euronet.nl (8.8.8/8.8.8) with ESMTP id IAA14177; Sat, 3 Jul 1999 08:39:53 +0200 (MET DST) Received: from scc.nl (scones.sup.scc.nl [192.168.2.4]) by scones.sup.scc.nl (8.9.3/8.9.3) with ESMTP id IAA69472; Sat, 3 Jul 1999 08:39:50 +0200 (CEST) (envelope-from marcel@scc.nl) Message-ID: <377DB035.7EE9AF75@scc.nl> Date: Sat, 03 Jul 1999 08:39:49 +0200 From: Marcel Moolenaar Organization: SCC vof X-Mailer: Mozilla 4.6 [en] (X11; I; FreeBSD 4.0-CURRENT i386) X-Accept-Language: en MIME-Version: 1.0 To: Chris Dillon Cc: stable@FreeBSD.ORG Subject: Re: Linux emulation References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG [snip] > > Andrij Korud wrote: > > > "LINUX: 'ioctl' fd=0, typ=0x54(T), num=0x17 not implemented" [snip] > I wrote: > > Can you apply the following patch and tell me if it solves your problem > > without creating new problems? :-) [snip] Chris Dillon wrote: > I just tried this patch on my server and it does the job, almost. > There is no "unsupported ioctl" error message, but the daemon can't > communicate with the UPS _unless_ I frob the port with tip(1) while > the daemon is running. The exact moment that I tip the serial port, > the daemon comes alive and tells me UPS communications were > established and its happy. tip(1) isn't able to actually talk to the > UPS, though it doesn't give me any errors of any kind, and I just ~. > to exit out. This would be acceptable if I could find an automated > way of frobbing the serial port so that the daemon works. :-) I figured something like that would do the trick. A ktrace showed that read(2) on the com-port returns -1 with errno set to -11. Everything else seemed to work. Can you tell us what kind of frobbing you did? Maybe there's a bug somewhere in the TCGETS/TCSETS iotcls (these are used right after the TIOCMBIC ioctl). In the mean time I prepare the patch for being committed. As for automated frobbing :-) Maybe it helps to initialize the device at boot-time. See /etc/rc.serial > BTW, I haven't tested to see if this breaks Linux emulation in any > other way, since that is the only thing I'm using it for on that > machine. I may take PowerAlert home and play with it there and see if > the X client works under emulation, too. The only breakage I expect is when using one of the ioctls. So you don't have to worry about any other kind of breakage. > Here are the patches I have so far to make it install and work fairly > cleanly under FreeBSD. Yes, the patches are quite "hackey", but > that's all you're gonna get without a rewrite of all the scripts to be > more portable or just plain BSD-aware (there are only provisions for > SysV-style startup scripts). The one bit where I changed a > "no_nl_echo" to a printf was purely cosmetic so that things looked > right on system startup. [snip] I have my uname patch applied by default, which means that uname returns "Linux" by default. When you run the pap_inst script in a Linux sh, it all works out of the box. Changing the defaults and directories in the script to match a FreeBSD environment is something which would be nice in case of a real port though (hint :-) Thanks for the feedback! -- Marcel Moolenaar mailto:marcel@scc.nl SCC Internetworking & Databases http://www.scc.nl/ Amsterdam, The Netherlands tel: +31 20 4200655 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message