【发布时间】:2013-12-05 18:06:32
【问题描述】:
我正在编写一个小函数,它使用VxWork 的tftpLib (http://www.vxdev.com/docs/vx55man/vxworks/ref/tftpLib.html) 从 TFTP 服务器下载文件 - 现在我意识到我的 tftpGet() 命令返回错误 1 但是我不确定错误代码 1 是什么意思。在发布的网站上它说:
ERRNO
S_tftpLib_INVALID_DESCRIPTOR
S_tftpLib_INVALID_ARGUMENT
S_tftpLib_NOT_CONNECTED
但是我怎么知道1 对应的是什么?
我的代码的 get 部分如下所示:
/* Initialize and createlocal file handle */
pFile = fopen("ngfm.bin","wb");
if (pFile != NULL)
{
/* Get file from TFTP server and write it to the file descriptor */
status = tftpGet (pTftpDesc, pFilename, pFile, TFTP_CLIENT);
printf("GOT %s\n",pFilename);
}
else
{
printf("Error in tftpGet()\nfailed to get %s from %s\nERRNO %d",pFilename,pHost, status);
}
【问题讨论】:
标签: vxworks error-code tftp