This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/11611] statvfs sign-extends lower 32 bits of f_fsid field, loses upper 32 bits


------- Additional Comments From rang at me dot com  2010-05-19 17:47 -------
A really simple test program, if you happen to have a file system around that delivers these FSIDs....

#include <stdio.h>
#include <sys/statfs.h>
#include <sys/statvfs.h>
#include <fcntl.h>

void main(int argc, char *argv[])
{
  int fd;
  struct statvfs v;
  struct statfs suck;

  if (argc != 2) { printf("need mountpoint\n"); return; }

  fd = open(argv[1], O_RDONLY);
  if (fd < 0) perror("open");

  if (fstatvfs(fd, &v) < 0) perror("fstatvfs");

  printf("%016lx\n", v.f_fsid);

  if (fstatfs(fd, &suck) < 0) perror("fstatfs");

  printf("%016lx\n", suck.f_fsid);
}


-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=11611

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]