BusyBox Bug and Patch Tracking
BusyBox
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0000420 [uClibc] Architecture Specific major always 09-08-05 03:13 02-13-07 10:05
Reporter stoecker View Status public  
Assigned To mjn3
Priority normal Resolution fixed  
Status closed   Product Version 0.9.27
Summary 0000420: ftell reports wrong position
Description When opening a file with fopen(file, "a"), the data is appended correctly, but the file position is illegal. It is 0 at the start of writing, whereas it should be the file size

The following example shows this problem. The numbers outputted should differ only by 1 and not by filesize as they do now.

#include <stdio.h>

int main(void)
{
  FILE *fh;
  int i;
  fh = fopen("shit", "ab");
  i = fseek(fh, 0, SEEK_END);
  fprintf(fh, "x");
  printf("%d %d\n", i, ftell(fh));
  fclose(fh);
  fh = fopen("shit", "ab");
  fprintf(fh, "\n");
  printf("%d %d\n", i, ftell(fh));
  fclose(fh);
  return 0;
}
Additional Information
Attached Files

- Relationships

- Notes
(0002157)
vapier
02-13-07 10:05

latest svn should work ok
 

- Issue History
Date Modified Username Field Change
09-08-05 03:13 stoecker New Issue
09-08-05 03:13 stoecker Status new => assigned
09-08-05 03:13 stoecker Assigned To  => uClibc
01-05-06 21:29 vapier Assigned To uClibc => mjn3
02-13-07 10:05 vapier Note Added: 0002157
02-13-07 10:05 vapier Status assigned => closed
02-13-07 10:05 vapier Resolution open => fixed


Copyright © 2000 - 2006 Mantis Group
Powered by Mantis Bugtracker