GNUnet  0.11.x
Functions
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.

Functions

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.

Author
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.

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

Definition at line 1616 of file disk.c.

1636 {
1637  if (NULL == fh)
1638  return GNUNET_SYSERR;
1639  if (dst_len < sizeof(int))
1640  return GNUNET_SYSERR;
1641  *((int *) dst) = fh->fd;
1642  return GNUNET_OK;
1643 }
static struct GNUNET_DISK_FileHandle * fh
File handle to STDIN, for reading restart/quit commands.
@ GNUNET_OK
Definition: gnunet_common.h:95
@ GNUNET_SYSERR
Definition: gnunet_common.h:93
int fd
File handle on Unix-like systems.

References GNUNET_break, GNUNET_DISK_PIPE_END_READ, GNUNET_DISK_PIPE_END_WRITE, and p.

Referenced by GNUNET_NETWORK_fdset_handle_set(), and start_process().

Here is the caller graph for this function: