lockf(3c): Minor formatting issues in man page
The word "function" should be italic, not bold, here in the lockf(3c) man page (three occurences):
The function argument is a control value that specifies the action to be taken. The permissible values for function are defined in <unistd.h> as follows: #define F_ULOCK 0 /* unlock previously locked section */ #define F_LOCK 1 /* lock section for exclusive use */ #define F_TLOCK 2 /* test & lock section for exclusive use */ #define F_TEST 3 /* test section for other locks */ All other values of function are reserved for future exten- sions and will result in an error if not implemented.
And here (three times):
EBADF The fildes argument is not a valid open file descriptor; or function is F_LOCK or F_TLOCK and fildes is not a valid file descriptor open for writing. EACCES or EAGAIN The function argument is F_TLOCK or F_TEST and the section is already locked by another process. EDEADLK The function argument is F_LOCK and a deadlock is detected.
And here (once):
EINVAL The function argument is not one of F_LOCK, F_TLOCK, F_TEST, or F_ULOCK; or size plus the current file offset is less than 0.
EAGAIN The function argument is F_LOCK or F_TLOCK and the file is mapped with mmap(2). EDEADLK or ENOLCK The function argument is F_LOCK, F_TLOCK, or F_ULOCK and the request would cause the number of locks to exceed a system-imposed limit.
In addition, "size" should be changed to italic here (four times):
The size argument is the number of contiguous bytes to be locked or unlocked. The resource to be locked or unlocked starts at the current offset in the file and extends forward for a positive size and backward for a negative size (the preceding bytes up to but not including the current offset). If size is zero, the section from the current offset through
The sections locked with F_LOCK or F_TLOCK may, in whole or in part, contain or be contained by a previously locked sec- tion for the same process. Locked sections will be unlocked starting at the point of the offset through size bytes or to the end of file if size is (off_t) 0. When this situation
Three times in this paragraph:
An F_ULOCK request in which size is non-zero and the offset of the last byte of the requested section is the maximum value for an object of type off_t, when the process has an existing lock in which size is 0 and which includes the last byte of the requested section, will be treated as a request to unlock from the start of the requested section with a size equal to 0. Otherwise, an F_ULOCK request will attempt to unlock only the requested section.
And twice here:
EINVAL The function argument is not one of F_LOCK, F_TLOCK, F_TEST, or F_ULOCK; or size plus the current file offset is less than 0. EOVERFLOW The offset of the first, or if size is not 0 then the last, byte in the requested section cannot be represented correctly in an object of type off_t.
Updated by William Dowling over 6 years ago
- % Done changed from 30 to 50
Waiting for review http://cr.illumos.org/~webrev/wdowling/4841-lockf-manpage-formatting/
Updated by Electric Monk over 6 years ago
- Status changed from In Progress to Closed
- % Done changed from 90 to 100
commit 7964943488a95dc9789c485ad9bc815283aadc35 Author: William Dowling <firstname.lastname@example.org> Date: 2014-05-27T17:59:09.000Z 4841 lockf(3c): Minor formatting issues in man page Reviewed by: Marcel Telka <email@example.com> Approved by: Richard Lowe <firstname.lastname@example.org>