FreeBSD Bugzilla – Attachment 148181 Details for
Bug 194293
FUSE program freezes when seeking pos > file size
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
fseek test
test.c (text/x-csrc), 505 bytes, created by
Hiroshi Nishida
on 2014-10-10 21:46:33 UTC
(
hide
)
Description:
fseek test
Filename:
MIME Type:
Creator:
Hiroshi Nishida
Created:
2014-10-10 21:46:33 UTC
Size:
505 bytes
patch
obsolete
>#include <stdio.h> >#include <stdlib.h> >#include <string.h> >#include <errno.h> >#include <sys/types.h> >#include <sys/stat.h> > >// Main >int >main(int argc, char **argv) >{ > char *str = "Testtest"; > FILE *fp; > > // Open file > if ((fp = fopen(argv[1], "w")) == NULL) { > perror("fopen"); > exit(1); > } > > // Seek > if (fseek(fp, 100, SEEK_SET) < 0) { > perror("fseek"); > } > > // Write > if (fwrite(str, 1, strlen(str), fp) < strlen(str)) { > fprintf(stderr, "fwrite: %s\n", strerror(ferror(fp))); > } > > exit(errno); >}
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 194293
: 148181 |
164744
|
164831
|
164881