
Hi Wolfgang,
On Mon, 2004-03-15 at 14:32, Wolfgang Denk wrote:
In message 4055AA27.3010805@staubli.com you wrote:
The attached patch fixes a bug in the ide identification string copy.
I may be missing something - but why do we copy these strings in the first place? Who is using them? (and where?)
The block_dev_desc_t structure defines vendor[40], product[20] and revision[8] - same as it is defined in hd_driveid_t.
ident_cpy's description says that it will copy the string and terminate it, but it can't in the case where all 8 bytes of revision are occupied - since the buffers are equal size.
Therefore Pierre's patch is correct, but instead of hardcoded values 8, 40, 20 I would rather see sizeof (iop->fw_rev) etc.
I noticed the same thing today when I was testing the PCMCIA patch that I'm about to send for PXA.