dmi_file_tell

Synopsis

#include <opendmi/utils/file.h>

off_t dmi_file_tell(int fd);

Description

The dmi_file_tell function returns the current file offset for an open file descriptor. It is equivalent to calling dmi_file_seek(fd, 0, SEEK_CUR).

Parameters

fd

Open file descriptor.

Return value

Returns the current byte offset from the beginning of the file, or -1 on error with errno set accordingly.

Errors

None.

See also