file i/o troubles
jennifer averett
jennifer.averett at oarcorp.com
Thu Apr 19 18:41:22 UTC 2001
Do you have a complete test that shows this problem that you
could submit? It is much easer to reproduce and
fix problems that way.
Thanks
Jennifer
Andrew Bythell wrote:
> Hello -
>
> I am seeing strange behaviour when writing to files using the IMFS and
> rtems-ss-20010326. I had this same problem with earlier snapshots too.
> Consider:
>
> FILE *fp = fopen("somefile", "w");
> fprintf(fp, "line1\n");
> fclose();
> fp = fopen("somefile", "a");
> fprintf("fp, "line2\n");
> fclose();
>
> The first time I call this routine, 'somefile' is created and contains:
>
> line1
> line2
>
> which is fine. Subsequent calls, using the same or different filename,
> insert junk (NULL characters) between line1 and line2:
>
> line1
> ^@^@^@^@^@^@...
> line2
>
> Can anyone offer an explanation and/or solution?
>
> --
> Andrew Bythell
> Nortel Networks System Verification
> Ottawa, Ontario Canada esn.39.56930
> tel.613.765-6930 fax.613.763-7795
More information about the users
mailing list