iscsi\_strerror(3) API Manual iscsi\_strerror(3)

# [NAME](#NAME)

iscsi\_strerror - Convert error code to string.

# [SYNOPSIS](#SYNOPSIS)

**const char * iscsi\_strerror** **(int rc);**

# [ARGUMENTS](#ARGUMENTS)

[rc](#rc)

int. Return code by libiscsiur functions. When provided error code is not a valid error code, return "Invalid argument".

# [DESCRIPTION](#DESCRIPTION)

Convert error code (int) to string (const char \*):

\* LIBISCSI\_OK -- "OK"

\* LIBISCSI\_ERR\_BUG -- "BUG of libopeniscsiusr library"

\* LIBISCSI\_ERR\_SESS\_NOT\_FOUND - "Specified iSCSI session not found"

\* LIBISCSI\_ERR\_ACCESS - "Permission deny"

\* LIBISCSI\_ERR\_NOMEM - "Out of memory"

\* LIBISCSI\_ERR\_SYSFS\_LOOKUP - "Could not lookup object in sysfs"

\* Other invalid error number -- "Invalid argument"

# [RETURN](#RETURN)

const char \*. The meaning of provided error code. Don't free returned pointer.

iscsi\_strerror October 2026

---

Document: iscsi_strerror(3) from open-iscsi 2.1.13-r2 (Chainguard OS)
Source: https://github.com/open-iscsi/open-iscsi
