FreeBSD Bugzilla – Attachment 236356 Details for
Bug 261705
devel/ccache when using zfs the cache size reported by ccache is incorrect; with ufs it is correct
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
test program printing st_blocks
stat-test.c (text/plain), 573 bytes, created by
Stefan Ehmann
on 2022-09-04 13:18:33 UTC
(
hide
)
Description:
test program printing st_blocks
Filename:
MIME Type:
Creator:
Stefan Ehmann
Created:
2022-09-04 13:18:33 UTC
Size:
573 bytes
patch
obsolete
>#include <sys/stat.h> > >#include <stdlib.h> >#include <stdio.h> >#include <unistd.h> > >int main() >{ > char tmpnam[] ="stat-test.XXXXXX"; > > int fd = mkstemp(tmpnam); > if (fd == -1) { > perror("tmpnam"); > return 1; > } > > char buf[2048]; > for (size_t i=0; i<sizeof(buf); i++) { > buf[i] = i; > } > > if (write(fd, buf, sizeof(buf)) != sizeof(buf)) { > perror("write"); > return 1; > } > > struct stat sb; > > for (int i=0; i<10; i++) { > if (fstat(fd, &sb) == -1) { > perror("fstat"); > return 1; > } > printf("[%i] st_blocks=%li\n", i, sb.st_blocks); > sleep(1); > } > > unlink(tmpnam); >}
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 261705
: 236356