The Samba-Bugzilla – Attachment 5050 Details for
Bug 6955
file size error by calling system call stat over Cifs mounted file system
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
file size using Linux system call stat
stattest.c (text/plain), 653 bytes, created by
Christof Will
on 2009-12-03 02:17:53 UTC
(
hide
)
Description:
file size using Linux system call stat
Filename:
MIME Type:
Creator:
Christof Will
Created:
2009-12-03 02:17:53 UTC
Size:
653 bytes
patch
obsolete
>#include <fcntl.h> /* open */ >#include <unistd.h> /* exit */ >#include <stdio.h> >#include <memory.h> >#include <time.h> >#include <stdlib.h> >#include <stdarg.h> >#include <ctype.h> > > >#include <sys/ioctl.h> /* ioctl */ >#include <sys/types.h> >#include <sys/mman.h> >#include <sys/stat.h> >#include <sys/time.h> > > >#include <errno.h> > >int main(int argc, char *argv[]) >{ > off_t size; > struct stat filestat; > > errno = 0; > stat(argv[1],&filestat); > size=filestat.st_size; > > printf("file %s size %d errno=%d\n sizeof(off_t)=%d sizeof(stat)=%d\n\n", > argv[1],(int)size, errno, sizeof(off_t), sizeof(filestat)); > >} >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 6955
: 5050