GNUnet  0.11.x
disk.h File Reference

Internal DISK related helper functions. More...

#include "gnunet_crypto_lib.h"
#include "gnunet_disk_lib.h"
Include dependency graph for disk.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


int GNUNET_DISK_internal_file_handle_ (const struct GNUNET_DISK_FileHandle *fh, void *dst, size_t dst_len)
 Retrieve OS file handle. More...

Detailed Description

Internal DISK related helper functions.

Nils Durner

Definition in file disk.h.

Function Documentation

◆ GNUNET_DISK_internal_file_handle_()

int GNUNET_DISK_internal_file_handle_ ( const struct GNUNET_DISK_FileHandle fh,
void *  dst,
size_t  dst_len 

Retrieve OS file handle.

fhGNUnet file descriptor
dstdestination buffer
dst_lenlength of dst
GNUNET_OK on success, GNUNET_SYSERR otherwise

Definition at line 1632 of file disk.c.

References GNUNET_DISK_FileHandle::fd, GNUNET_OK, and GNUNET_SYSERR.

Referenced by GNUNET_NETWORK_fdset_handle_set(), and start_process().

1635 {
1636  if (NULL == fh)
1637  return GNUNET_SYSERR;
1638  if (dst_len < sizeof(int))
1639  return GNUNET_SYSERR;
1640  *((int *) dst) = fh->fd;
1641  return GNUNET_OK;
1642 }
int fd
File handle on Unix-like systems.
Here is the caller graph for this function: