===================================================================================================================================
linux系统下文件写入,读取出现乱码原因
前一段时间做好了FL2440开发板eeprom的驱动,今天在编写往eeprom中读写的测试程序,可以往里面写入,但是在读出来的时候会出现乱码问题。
有问题的代码
#include <stdio.h>
#include <string.h>
#include <sys/ioctl.h>
#include <stdlib.h>
#include <fcntl.h>
#include <sys/io.h>
#include <getopt.h>
/********************************************************************************
* Description:
* Input Args:
* Output Args:
* Return Value:
********************************************************************************/
int main (int argc, char **argv)
{
int fd, ret, opt;