int .main( void )<性病>
int main
{
int fd;
char buf[] = ".efgh";虚拟主机
cha.r readbuf[20];.
fd = open("/dev/mtdblock/3",O_.RDWR, O_A.PPEND); 乙肝
if.( fd < 0 )
printf("Cannot ope.n /dev/mtdblock./3\n");域名
else
printf(".Ope.n /dev/mtdblock/3 successfull!\n");.
if( write(fd., buf, s.izeof(buf)) < 0 ) 鲜花
printf("Cannot write into /.dev/m.tdblock/3!\n");.
else
printf("Write into /dev/.mtdblock/3 successful!\.n");教育
return 0;
}
我的.写入程序,如上所示。但是多次运行写入程序后,读出来的数.据依然是:efgh。 健康
我看了man open 。O_APPEND模.式是:写入时,以插入的模式写到文.件的末尾。.
但是,为何多.次运行写入程序,却只是覆盖以前的数据。.
请.教大侠,如何实现以插入文件末尾的方式.,写入FLASH设备???[成人用品]
谢谢!
[. 本帖最后由 zhj1011 于 200.9-3-16 11:30 编辑 ]( 游戏 )