- memset(localBuffer,0,dev->nDataBytesPerChunk);
- smallIncreaseOk = 1;
-
- while(increase > 0 && smallIncreaseOk){
- thisWrite = increase;
- if(thisWrite > dev->nDataBytesPerChunk)
- thisWrite = dev->nDataBytesPerChunk;
- written = yaffs_DoWriteDataToFile(obj,localBuffer,pos,thisWrite,0);
- if(written == thisWrite){
- pos += thisWrite;
- increase -= thisWrite;
+ memset(local_buffer,0,dev->data_bytes_per_chunk);
+ small_increase_ok = 1;
+
+ while(increase > 0 && small_increase_ok){
+ this_write = increase;
+ if(this_write > dev->data_bytes_per_chunk)
+ this_write = dev->data_bytes_per_chunk;
+ written = yaffs_do_file_wr(obj,local_buffer,pos,this_write,0);
+ if(written == this_write){
+ pos += this_write;
+ increase -= this_write;