Hi,

the attached program gives EROFS at fgetpos() when called with FILE being
on a read-only filesystem. I had no debug symbols installed, so I didn't
track it down any further yet. From reading the stdio/fgetpos.c and ftell.c,
I couldn't see how the filesystem was accessed even. 

Thanks,
Marcus

-- 
`Rhubarb is no Egyptian god.' Debian http://www.debian.org Check Key server 
Marcus Brinkmann              GNU    http://www.gnu.org    for public PGP Key 
[EMAIL PROTECTED],     [EMAIL PROTECTED]    PGP Key ID 36E7CD09
http://homepage.ruhr-uni-bochum.de/Marcus.Brinkmann/       [EMAIL PROTECTED]
#include <stdio.h>
#include <string.h>
#include <errno.h>

main(int argc, char *argv[])
{
FILE *f;
fpos_t fpos;

  if (argc != 2) {
     printf("Usage: %s FILE\n", argv[0]);
     return;
  }
  f = fopen(argv[1], "r");
  if (!f) {
     printf ("fopen: %s\n", strerror(errno));
     return;
  }
  if (0 != fgetpos(f, &fpos)) {
     printf ("fgetpos: %s\n", strerror(errno));
  }
  fclose(f);
}

Reply via email to