在
2005-4-13 11:09:24,
havefunok给您发送的消息!
消息标题:您好,请问您一个问题请问:vxworks下,目标机如何存取主机(pc)文件呢?我是想用主机ftp server来传,但写的程序有错,该怎么写呢? #include...... int fd; fd=creat("c:\file",2); open("c:\file",2,0); close(fd);这个程序报错:找不到文件夹或页错误,为什么呢?我的主机当前工作路径是c:
我的回答:
在主机的ftp server要设定好用户名,密码,路径非常重要;
(1)用户名和密码可以在启动bootrom时,用命令行来修改,例如;
[VxWorks Boot]: c
'.' = clear field; '-' = go to previous field; ^D = quit
boot device : motfec0 processor number : 0 host name : test file name : vxWorks inet on ethernet (e) : 192.168.0.29 inet on backplane (b): host inet (h) : 192.168.0.86 gateway inet (g) : 192.168.0.1 user (u) : a target ftp password (pw) (blank = use rsh): a flags (f) : 0x0 target name (tn) : startup script (s) : other (o) :
[VxWorks Boot]: p
boot device : motfec unit number : 0 processor number : 0 host name : test file name : vxWorks inet on ethernet (e) : 192.168.0.29 host inet (h) : 192.168.0.86 gateway inet (g) : 192.168.0.1 user (u) : target ftp password (pw) : a flags (f) : 0x0
(2)并且文件在目标机登陆后默认的目录下,才可以成功!