I am trying to write a file in VxWorks using something like
saveFd = open("myfile.txt",0x102, 0777 )
oldFd = ioGlobalStdGet(1)
ioGlobalStdSet(1, saveFd)
d 0xfea00100, 4
ioGlobalStdSet(1, oldFd)
But I am unnable to perform the file creation / writing.
Here is the output:
-> saveFd = open("myfile.txt",0x102, 0777 )
saveFd = 0x1fbfb040: value = -1 = 0xffffffff
-> ioGlobalStdSet(1, saveFd)
dvalue = -1 = 0xffffffff
How can I create a file with the desired output?
Thanks in advance.
You have something wrong with ‘flags’ parameter passed to ‘open’. Correct type of accesses:
The flags passed to open should ‘OR’ the flags. Like this:
O_CREAT | O_RDWR = 0x202With this parameter you may get something like this (if you have a host ftp properly connected):
(Make sure you have a write permission granted on the ftp host server.)