regarding the append to the file - VxWorks

This is a discussion on regarding the append to the file - VxWorks ; Hi, I am trying to apend the data to the file through the open() using the O_APPEND argument . But not able to succeed, Is it possible in vxWorks? If not possible is any other ways to do this .. ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: regarding the append to the file

  1. regarding the append to the file

    Hi,

    I am trying to apend the data to the file through the open() using the
    O_APPEND argument .
    But not able to succeed, Is it possible in vxWorks?
    If not possible is any other ways to do this ..
    please help me out


  2. Re: regarding the append to the file

    Yes, it is possible to open files in append mode. It should be as
    easy as ...

    fd = open (, O_RDWR | O_APPEND | you may want>, 0666);
    write (fd, , );

    The only potential things to be careful of that I can think of
    are ..
    1. Make sure to use either the O_RDWR or O_WRONLY option. The
    O_RDONLY option should not work with O_APPEND.
    2. Make sure the file exists if you are not using O_CREAT.

    Sparky.

    On Aug 20, 5:52*pm, jimmy wrote:
    > Hi,
    >
    > I am trying to apend the data to the file through the open() using the
    > O_APPEND argument .
    > But not able to succeed, Is it possible in vxWorks?
    > If not possible is any other ways to do this ..
    > please help me out



+ Reply to Thread