Re: why store the search type in the ieee name field?

James Bottomley
2003-02-10T23:12:59Z

On Mon, 2003-02-10 at 16:45, Steven Dake wrote:
> Folks,
>
> I was wondering the reasoning behind the code
>
> scsi_scan:734
> /*
> * All OK - store ID
> */
> name[0] = hex_str[id_search->id_type];
>
> This corrupts a perfectly good IEEE unique identifier (WWN for FC
> drives). Is there some usage for this in user space?

Erm, it's appending the type to the beginning of the name string
(although it does seem to be relying on the sysfs name field being zero
filled). I don't see any corruption since the inquiry fields and unique
name name follows this byte.

You get the identifier it found from the sysfs name file for the
device. The first byte tells you what type of unique name you're
dealing with.

James