Путеводитель по Руководству Linux

  User  |  Syst  |  Libr  |  Device  |  Files  |  Other  |  Admin  |  Head  |



   open_by_handle_at    ( 2 )

получить дескриптор для имени пути и открыть файл через дескриптор (obtain handle for a pathname and open file via a handle)

  Name  |  Synopsis  |  Description  |  Return value  |    Error    |  Versions  |  Conforming to  |  Note  |  Examples  |  See also  |

Ошибки (Error)

name_to_handle_at() and open_by_handle_at() can fail for the same errors as openat(2). In addition, they can fail with the errors noted below.

name_to_handle_at() can fail with the following errors:

EFAULT pathname, mount_id, or handle points outside your accessible address space.

EINVAL flags includes an invalid bit value.

EINVAL handle->handle_bytes is greater than MAX_HANDLE_SZ.

ENOENT pathname is an empty string, but AT_EMPTY_PATH was not specified in flags.

ENOTDIR The file descriptor supplied in dirfd does not refer to a directory, and it is not the case that both flags includes AT_EMPTY_PATH and pathname is an empty string.

EOPNOTSUPP The filesystem does not support decoding of a pathname to a file handle.

EOVERFLOW The handle->handle_bytes value passed into the call was too small. When this error occurs, handle->handle_bytes is updated to indicate the required size for the handle.

open_by_handle_at() can fail with the following errors:

EBADF mount_fd is not an open file descriptor.

EBADF pathname is relative but dirfd is neither AT_FDCWD nor a valid file descriptor.

EFAULT handle points outside your accessible address space.

EINVAL handle->handle_bytes is greater than MAX_HANDLE_SZ or is equal to zero.

ELOOP handle refers to a symbolic link, but O_PATH was not specified in flags.

EPERM The caller does not have the CAP_DAC_READ_SEARCH capability.

ESTALE The specified handle is not valid. This error will occur if, for example, the file has been deleted.