Actions
Bug #8352
openstat(2) man page needs to describe difference between stat() and fstat() when working on character special files
Status:
New
Priority:
Normal
Assignee:
-
Category:
manpage - manual pages
Start date:
2017-06-07
Due date:
% Done:
0%
Estimated time:
Difficulty:
Medium
Tags:
needs-triage
Gerrit CR:
Description
As regression introduced in #6866 (and fixed in #8108) has shown, the behavior of fstat() on character special files is counter-intuitive - one needs to fopen() first, and then use stat() to find the st_size.
Currently, stat(2) tries to mention that, but it really could be improved:
st_size For regular files, this is the address of the end of the file. For block special or character special, this is not defined. See also pipe(2).
Related issues
Updated by Yuri Pankov about 5 years ago
- Related to Bug #6866: zdb -l should return non-zero if it fails to find any label added
Updated by Yuri Pankov about 5 years ago
- Related to Bug #8108: zdb -l fails to read labels 2 and 3 added
Actions