|
弱问tonado搞手。为什么打开local file system的文件失败
[复制链接]
主机操作系统windows2000 (vmware上的虚拟机 vmware版本5.5.3)
Tonado版本 2.2
Target:(simulator)
CPU: VxSim for Windows
Runtime Name: VxWorks
Runtime Version: 5.5
BSP version: 1.2/1
Created: Oct 2 2002, 10:16:06
WDB Comm Type: WDB_COMM_PIPE
Target Server:
tgtsvr.exe vxsim@sjtu-b040a59071 -n OpenFile -V -B wdbpipe -Bt 5 -Br 1 -R C:\Tornado2.2\target\proj -RW -redirectIO
程序:
void IsSuccess(int fd);
void main()
{
int fd = -1;
fd = open("C://Tornado2.2//target//proj//RaidLog.txt", O_CREAT | O_RDWR, 0);
IsSuccess(fd);
fd = open("C:/Tornado2.2/target/proj/RaidLog.txt", O_CREAT | O_RDWR, 0);
IsSuccess(fd);
fd = open("C:\\Tornado2.2\\target\\proj\\RaidLog.txt", O_CREAT | O_RDWR, 0);
IsSuccess(fd);
}
void IsSuccess(int fd)
{
if( fd == -1)
printf("error\n");
else
printf("success\n");
}
保险起见用了三个路径(有点傻,呵呵)。
|
|