is fstat or printf error?
- From: ssszer@xxxxxxxxx
- Date: Thu, 29 May 2008 19:43:41 -0700 (PDT)
hello,
$uname -a
Linux linux 2.6.5-7.97-bigsmp #1 SMP Fri Jul 2 14:21:59 UTC 2004 i686
i686 i386 GNU/Linux
$cat t.c
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <stdio.h>
int
main()
{
FILE *tmpfl = tmpfile();
struct stat st;
fstat(fileno(tmpfl), &st);
printf("dev:%d, %d, %d\n", st.st_dev, 1, 5); // <======
printf("%d, %d, %d", 1, 5,7);
getchar();
}
$cc t.c
$./a.out
dev:2049, 0, 1
1, 5, 7
$
// <====== is error. Would you give me some clue?
.
- Follow-Ups:
- Re: is fstat or printf error?
- From: Marcel Bruinsma
- Re: is fstat or printf error?
- Prev by Date: customizing gdm in Fedora 9
- Next by Date: Re: is fstat or printf error?
- Previous by thread: customizing gdm in Fedora 9
- Next by thread: Re: is fstat or printf error?
- Index(es):