[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: kern/39514: ataraid(4): basic bio(4) support
The following reply was made to PR kern/39514; it has been noted by GNATS.
From: Juan RP <xtraeme%gmail.com@localhost>
Cc: matthew green <mrg%eterna.com.au@localhost>
Subject: Re: kern/39514: ataraid(4): basic bio(4) support
Date: Fri, 12 Sep 2008 04:48:43 +0200
On Fri, 12 Sep 2008 10:13:53 +1000
matthew green <mrg%eterna.com.au@localhost> wrote:
> + char aai_name; /* array volume name */
> [ ... ]
> + if (aai->aai_name)
> + strlcpy(bv->bv_vendor, aai->aai_name,
> + sizeof(bv->bv_vendor));
> this will always be true.
> it seems that you should make aai_name a char * instead
> of an array, and to malloc/free the space for it as
> necessary. limiting names to 31 chars is going to bite
> someone in the future.
Thanks for the comment.
But what's the point of using mem from heap if bv_vendor is also
an array of 31 chars?
Also, I think this size should be enough for most uses. In all
metadata formats supported the half of this size is used. Take
a look at ata_raidreg.h.
Main Index |
Thread Index |