[illumos-Developer] Webrev for bug 561: Strange characters when executing "format"

Garrett D'Amore garrett at damore.org
Fri Jul 22 07:33:27 PDT 2011


On Thu, 2011-07-21 at 08:06 -0500, Gary Mills wrote:
> On Sat, Jul 09, 2011 at 09:13:32PM -0500, Gary Mills wrote:
> > > 
> > > The three values in the inquiry data are space-padded in fixed-length
> > > fields, not null terminated.  The code to create a disk name from this
> > > data already exists as the get_generic_disk_name() function in the
> > > `format' source.  I'll be posting a new webrev soon with this function
> > > substituted.  Unfortunately, I can't test it, but it pretty well has
> > > to work.
> > 
> > My new webrev is at:
> > 
> >     http://cr.illumos.org/view/4z5nj2vk/illumos561-1/
> 
> Any interest in this one?  I've had no reviews of the revised webrev

LGTM.

Your padding in your prototype is a bit... hmm.. strange.  I'd have
indented far less.  Also, I'd have taken this opportunity to yank
support for the K&R prototypes -- we don't still need legacy pre-ANSI
support in our headers.

	- Garrett

> so far.
> 
> > It now uses the internal function get_generic_disk_name() to format
> > the label for display.  As well, it now only prints the `Inquiry
> > failed' message if you supply the `-m' option of the format command.
> > This is reasonable because the USCSI ioctl will always fail when the
> > disk does not appear as a SCSI disk.  In that case, it will display
> > the disk type as `Unknown-Unknown-0001', but `format' will still work
> > normally.  From reading the source, I can't tell when, if ever, the
> > rest of get_disk_name() will be executed.  That's why I can't test
> > that code path,
> 





More information about the Developer mailing list