Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 Jul 1997 16:48:11 +0930 (CST)
From:      Michael Smith <msmith@atrad.adelaide.edu.au>
To:        skynyrd@opus.cts.cwu.edu
Cc:        msmith@atrad.adelaide.edu.au, freebsd-hackers@FreeBSD.ORG
Subject:   Re: suggested enhancement: linux_ioctl.c diagnostic output
Message-ID:  <199707210718.QAA22125@genesis.atrad.adelaide.edu.au>
In-Reply-To: <Pine.BSF.3.95.970720231428.28614B-100000@opus.cts.cwu.edu> from Chris Timmons at "Jul 21, 97 00:08:52 am"

next in thread | previous in thread | raw e-mail | index | archive | help
Chris Timmons stands accused of saying:
> 
> Thanks for the response.

No sweat; like I (should have) said, sorry I was so slow with it.

> Much easier to understand.  I wish I'd thought of your simplification :) 
> As for the is_printable test, would it be also prudent to make sure that
> the value is < 0x7f as well?  I'm pretty naive about character set issues
> and don't know what some of the values with the 8th bit set might produce. 
> Some of the newer ioctl number assignments start in a range beginning at
> 0x89 (and beyond.)

I think its reasonable to assume that any value >= 0x20 is printable.
The only exception I can think of is 0x7f, which may result in only
one ' being visible on a serial console.

> > The other implementation of the IO[WR] decoding I would consider would
> > use a small lookup table and a large shift to generate an index.  The
> > massively nested ? set you used makes for very difficult reading.
> 
> Maybe a lookup table would be the best way to do this neatly in terms of
> the printf statement.  I'll think about that for a while. 

Not using a lookup makes the printf self-contained.  I can't think of any
other advantages.

-- 
]] Mike Smith, Software Engineer        msmith@gsoft.com.au             [[
]] Genesis Software                     genesis@gsoft.com.au            [[
]] High-speed data acquisition and      (GSM mobile)     0411-222-496   [[
]] realtime instrument control.         (ph)          +61-8-8267-3493   [[
]] Unix hardware collector.             "Where are your PEZ?" The Tick  [[



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199707210718.QAA22125>