You need to read the source to be sure how it will return errors.
Usually, it is the negative of a standard error code, e.g., \-\fBEPERM\fP.
The _syscall() macros will return the result \fIr\fP of the system call
-when \fIr\fP is nonnegative, but will return \-1 and set the variable
+when \fIr\fP is non-negative, but will return \-1 and set the variable
.I errno
to \-\fIr\fP when \fIr\fP is negative.
For the error codes, see
A few
.BR ioctl ()
requests use the return value as an output parameter
-and return a nonnegative value on success.
+and return a non-negative value on success.
On error, \-1 is returned, and
.I errno
is set appropriately.
destruction.
.SH "RETURN VALUE"
If successful, the return value will be the message queue identifier (a
-nonnegative integer), otherwise \-1
+non-negative integer), otherwise \-1
with
.I errno
indicating the error.
.I errno
indicating the error.
-Otherwise the system call returns a nonnegative value depending on
+Otherwise the system call returns a non-negative value depending on
.I cmd
as follows:
.TP 11
.\" and a check is made to see if it is marked for destruction.
.SH "RETURN VALUE"
If successful, the return value will be the semaphore set identifier
-(a nonnegative integer), otherwise \-1
+(a non-negative integer), otherwise \-1
is returned, with
.I errno
indicating the error.