Skip to content

Commit 03f47a9

Browse files
committed
fix interior return value documentation
1 parent 5fad00a commit 03f47a9

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

libc/src/sys/ioctl/linux/ioctl.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,8 @@ LLVM_LIBC_FUNCTION(int, ioctl, (int fd, unsigned long request, ...)) {
2424
LIBC_NAMESPACE::syscall_impl<int>(SYS_ioctl, fd, request, data_pointer);
2525
va_end(vargs);
2626

27-
// From `man ioctl`:
28-
// "Usually, on success zero is returned. A few ioctl() operations
29-
// use the return value as an output parameter and return a
30-
// nonnegative value on success. On error, -1 is returned, and errno
31-
// is set to indicate the error."
27+
// Some ioctls utilize positive return values; on errors, -1 is returned if
28+
// errno is set.
3229
if (ret < 0) {
3330
libc_errno = -ret;
3431
return -1;

0 commit comments

Comments
 (0)