--- device/nandflash/nandflash_smallblock.c 2009-01-21 21:16:59.000000000 +0100 +++ nandflash_smallblock.c 2009-01-21 21:17:13.000000000 +0100 @@ -516,7 +516,7 @@ #endif nf->writebuffer=(u8*)malloc(dev->pagedumpsize); //nf->memsize=528*32*4096; - if ((nf->fdump= open(dev->dump, FILE_FLAG)) < 0) + if ((nf->fdump= open(dev->dump, FILE_FLAG | O_TRUNC | O_CREAT, S_IRUSR | S_IWUSR)) < 0) { free(nf); printf("error open nandflash dump!\n");