---
name: "sysdecode_fcntl_arg"
section: "3"
platform: "freebsd"
package: "base"
version: "16.0-CURRENT-20261027-61c70dc16a79"
release: "FreeBSD 16.0-CURRENT (2026-10-27)"
platforms: ["freebsd"]
url: "https://new.carta.tech/sysdecode_fcntl_arg"
---

# sysdecode\_fcntl\_arg(3)

output description of fcntl argument

## NAME

**sysdecode\_fcntl\_arg**, **sysdecode\_fcntl\_arg\_p** – output description of fcntl argument

## LIBRARY

library “libsysdecode”

## SYNOPSIS

**#include \<sysdecode.h\>**

*void*\

**sysdecode\_fcntl\_arg**(*FILE \*fp*, *int cmd*, *uintptr\_t arg*, *int base*);

*bool*\

**sysdecode\_fcntl\_arg\_p**(*int cmd*);

## DESCRIPTION

The **sysdecode\_fcntl\_arg**() function outputs a text description of the optional *arg* argument to [fcntl(2)](/fcntl/2.md) to the stream *fp*. The type and format of *arg* are determined by *cmd*:

| | | |
| --- | --- | --- |
| **Command** | *arg* **Type** | **Output** **Format** |
|  |
| F\_SETFD | *int* |  |
|  |
| F\_SETFL | *int* |  |
|  |
| F\_GETLK | *struct* *flock* *\** |  |
| F\_SETLK | *struct* *flock* *\** |  |
| F\_SETLKW | *struct* *flock* *\** |  |
|  |
| Others | *int* |  |

The **sysdecode\_fcntl\_arg\_p**() function can be used to determine if a [fcntl(2)](/fcntl/2.md) command uses the optional third argument to [fcntl(2)](/fcntl/2.md). The function returns true if *cmd* accepts a third argument to [fcntl(2)](/fcntl/2.md) and false if it does not.

## RETURN VALUES

The **sysdecode\_fcntl\_arg\_p** function returns true if *cmd* accepts a third argument to [fcntl(2)](/fcntl/2.md) and false if it does not.

## SEE ALSO

[sysdecode(3)](/sysdecode/3.md), [sysdecode\_fcntl\_cmd(3)](/sysdecode_fcntl_cmd/3.md), [sysdecode\_fcntl\_fileflags(3)](/sysdecode_fcntl_fileflags/3.md)
