Re: [Yaffs] Re: YAFFS fs images not working the way I expect

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Thomas Gleixner
Date:  
To: David Wuertele
CC: YAFFS
Subject: Re: [Yaffs] Re: YAFFS fs images not working the way I expect
On Wed, 2004-10-27 at 15:06 -0700, David Wuertele wrote:
> I think that "myprog" can be written by copying mkyaffs.c to
> readyaffs.c, removing the erase code, and changing the part that
> writes the data to this:
>
>     if(addr) {
>         for(offset = 0; offset <meminfo.erasesize; offset+=512) {
>              lseek(fd,addr+offset,SEEK_SET);
>              if(read(fd,imgpage,512) == 512) {
>                  oob.start = addr+offset;
>                  oob.length=16;
>                  oob.ptr=&imgpage[512];
>                  ioctl(fd,MEMREADOOB,&oob);
>                  write (1, imgpage, 528);
>              }
>          }
>      }


nanddump from MTD/utils is doing excactly this.

tglx