This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/11611] statvfs sign-extends lower 32 bits of f_fsid field, loses upper 32 bits
- From: "rang at me dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 19 May 2010 17:47:49 -0000
- Subject: [Bug libc/11611] statvfs sign-extends lower 32 bits of f_fsid field, loses upper 32 bits
- References: <20100519174718.11611.rang@me.com>
- Reply-to: sourceware-bugzilla at sourceware dot org
------- 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.