ok Philip,
i tried writing from a different function.
and the code is like this.
[ this is from my program ]
void write_file(char *src, char *dest){
char buff[4096];
uint16_t n,fd,ft;
fd = open(src,O_RDONLY);
ft = open(dest,O_CREAT | O_WRONLY,RW_EVERYONE);
while(n = read(fd,buff,sizeof(buff)) > 0){
printf("\n n = %u",n);
if(write(ft,buff,n) != n){
printf("\n write error");
getchar();
}
getchar();
}
}
--------------
RW_EVERYONE is #defined
getchar() has been used to step through.
n is still 1.
i am very frustrated ( n = 1 );
can u figure out this problem...
can anybody please help me out with this.
also please tell me why does this happen.
__________________________________
Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time.
http://taxes.yahoo.com/filing.html
--
http://mm.ilug-bom.org.in/mailman/listinfo/linuxers