GDBserver

Functions
fileio.c File Reference
`#include "common-defs.h"`
`#include "fileio.h"`
`#include <sys/stat.h>`
`#include <fcntl.h>`

Go to the source code of this file.

## Functions
int | host_to_fileio_error (int error)
int | fileio_to_host_openflags (int fileio_open_flags, int *open_flags_p)
int | fileio_to_host_mode (int fileio_mode, mode_t *mode_p)
static LONGEST | fileio_mode_pack (mode_t mode)
static void | host_to_fileio_mode (mode_t num, fio_mode_t fnum)
static void | host_to_fileio_ulong (LONGEST num, fio_ulong_t fnum)
void | host_to_fileio_stat (struct stat *st, struct fio_stat *fst)

## Function Documentation

## ◆ fileio_mode_pack()

static LONGEST fileio_mode_pack | ( | mode_t | mode | ) |
| static

Definition at line 164 of file fileio.c.

References S_IRGRP, S_IROTH, S_IRUSR, S_ISCHR, S_ISDIR, S_ISREG, S_IWGRP, S_IWOTH, S_IWUSR, S_IXGRP, S_IXOTH, and S_IXUSR.

Referenced by host_to_fileio_mode().

## ◆ fileio_to_host_mode()

int fileio_to_host_mode | ( | int | fileio_mode,
|  | mode_t * | mode_p
| ) |  |

Definition at line 115 of file fileio.c.

References S_IRGRP, S_IROTH, S_IRUSR, S_IWGRP, S_IWOTH, S_IWUSR, S_IXGRP, S_IXOTH, and S_IXUSR.

Referenced by handle_open().

## ◆ fileio_to_host_openflags()

int fileio_to_host_openflags | ( | int | fileio_open_flags,
|  | int * | open_flags_p
| ) |  |

Definition at line 81 of file fileio.c.

References O_BINARY.

Referenced by handle_open().

## ◆ host_to_fileio_error()

int host_to_fileio_error | ( | int | error | ) |

Definition at line 28 of file fileio.c.

References error().

Referenced by hostio_last_error_from_errno().

## ◆ host_to_fileio_mode()

static void host_to_fileio_mode | ( | mode_t | num,
|  | fio_mode_t | fnum
| ) |  |
| static

Definition at line 208 of file fileio.c.

References fileio_mode_pack(), and host_to_bigendian().

Referenced by host_to_fileio_stat().

## ◆ host_to_fileio_stat()

void host_to_fileio_stat | ( | struct stat * | st,
|  | struct fio_stat * | fst
| ) |  |

Definition at line 224 of file fileio.c.

References host_to_fileio_mode(), host_to_fileio_time(), host_to_fileio_uint(), and host_to_fileio_ulong().

Referenced by handle_fstat().

## ◆ host_to_fileio_ulong()

static void host_to_fileio_ulong | ( | LONGEST | num,
|  | fio_ulong_t | fnum
| ) |  |
| static

Definition at line 216 of file fileio.c.

References host_to_bigendian().

Referenced by host_to_fileio_stat().