[Yaffs] PATCH!!! PATCH!!! (Was Sorry state of YAFFS2)

Sergey Kubushyn ksi at koi8.net
Sat Oct 15 04:06:14 BST 2005


On Fri, 14 Oct 2005, Sergey Kubushyn wrote:

Sorry, a typo...

> +void nandmtd2_buf2pt(yaffs_Device *dev, yaffs_PackedTags2 *pt, int
> is_raw)
> +{
> +	struct mtd_info *mtd = (struct mtd_info *)(dev->genericDevice);
> +	int	i, j = 0, k, n;
> +	__u8	pt2_byte_buf[PT2_BYTES];
> +
> +
> +	if (!is_raw) {
> +		pt->t.sequenceNumber = *((unsigned int *)
> &dev->spareBuffer[0]);
> +		pt->t.objectId = *((unsigned int *)
> &dev->spareBuffer[4]);
> +		pt->t.chunkId = *((unsigned int *)
> &dev->spareBuffer[8]);
> +		pt->t.byteCount = *((unsigned int *)
> &dev->spareBuffer[12]);
> +		pt->ecc.colParity = dev->spareBuffer[16];
> +		pt->ecc.lineParity = (dev->spareBuffer[17] &
> 0x000000ff) |
> +	 		((dev->spareBuffer[18] << 8) & 0x0000ff00) |
> +	 		((dev->spareBuffer[19] << 16) & 0x00ff0000) |
> +	 		((dev->spareBuffer[20] >> 24) & 0xff000000);
                                               ^^ must be "<<"

> +		pt->ecc.lineParityPrime = (dev->spareBuffer[21] &
> 0x000000ff) |
> +	 		((dev->spareBuffer[22] << 8) & 0x0000ff00) |
> +	 		((dev->spareBuffer[23] << 16) & 0x00ff0000) |
> +	 		((dev->spareBuffer[24] >> 24) & 0xff000000);
                                               ^^ ditto
> +	} else {
> +		k = mtd->oobinfo.oobfree[j][0];
> +		n = mtd->oobinfo.oobfree[j][1];

---
******************************************************************
*  KSI at home    KOI8 Net  < >  The impossible we do immediately.  *
*  Las Vegas   NV, USA   < >  Miracles require 24-hour notice.   *
******************************************************************




More information about the yaffs mailing list