Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
file.c File Reference
#include <stdio.h>
#include <unistd.h>
#include <errno.h>
#include <fcntl.h>
#include <signal.h>
#include <sys/ioctl.h>
#include <sys/mount.h>
#include <sys/socket.h>
#include <sys/stat.h>
#include <sys/un.h>
#include <os.h>

Go to the source code of this file.

Macros

#define SHUT_RD   0
 
#define SHUT_WR   1
 
#define SHUT_RDWR   2
 

Functions

int os_stat_fd (const int fd, struct uml_stat *ubuf)
 
int os_stat_file (const char *file_name, struct uml_stat *ubuf)
 
int os_access (const char *file, int mode)
 
int os_ioctl_generic (int fd, unsigned int cmd, unsigned long arg)
 
int os_get_ifname (int fd, char *namebuf)
 
int os_set_slip (int fd)
 
int os_mode_fd (int fd, int mode)
 
int os_file_type (char *file)
 
int os_file_mode (const char *file, struct openflags *mode_out)
 
int os_open_file (const char *file, struct openflags flags, int mode)
 
int os_connect_socket (const char *name)
 
void os_close_file (int fd)
 
int os_seek_file (int fd, unsigned long long offset)
 
int os_read_file (int fd, void *buf, int len)
 
int os_write_file (int fd, const void *buf, int len)
 
int os_file_size (const char *file, unsigned long long *size_out)
 
int os_file_modtime (const char *file, unsigned long *modtime)
 
int os_set_exec_close (int fd)
 
int os_pipe (int *fds, int stream, int close_on_exec)
 
int os_set_fd_async (int fd)
 
int os_clear_fd_async (int fd)
 
int os_set_fd_block (int fd, int blocking)
 
int os_accept_connection (int fd)
 
int os_shutdown_socket (int fd, int r, int w)
 
int os_rcv_fd (int fd, int *helper_pid_out)
 
int os_create_unix_socket (const char *file, int len, int close_on_exec)
 
void os_flush_stdout (void)
 
int os_lock_file (int fd, int excl)
 
unsigned os_major (unsigned long long dev)
 
unsigned os_minor (unsigned long long dev)
 
unsigned long long os_makedev (unsigned major, unsigned minor)
 

Macro Definition Documentation

#define SHUT_RD   0

Definition at line 434 of file file.c.

#define SHUT_RDWR   2

Definition at line 442 of file file.c.

#define SHUT_WR   1

Definition at line 438 of file file.c.

Function Documentation

int os_accept_connection ( int  fd)

Definition at line 423 of file file.c.

int os_access ( const char file,
int  mode 
)

Definition at line 64 of file file.c.

int os_clear_fd_async ( int  fd)

Definition at line 390 of file file.c.

void os_close_file ( int  fd)

Definition at line 236 of file file.c.

int os_connect_socket ( const char name)

Definition at line 208 of file file.c.

int os_create_unix_socket ( const char file,
int  len,
int  close_on_exec 
)

Definition at line 504 of file file.c.

int os_file_mode ( const char file,
struct openflags mode_out 
)

Definition at line 151 of file file.c.

int os_file_modtime ( const char file,
unsigned long modtime 
)

Definition at line 307 of file file.c.

int os_file_size ( const char file,
unsigned long long size_out 
)

Definition at line 269 of file file.c.

int os_file_type ( char file)

Definition at line 127 of file file.c.

void os_flush_stdout ( void  )

Definition at line 531 of file file.c.

int os_get_ifname ( int  fd,
char namebuf 
)

Definition at line 93 of file file.c.

int os_ioctl_generic ( int  fd,
unsigned int  cmd,
unsigned long  arg 
)

Definition at line 81 of file file.c.

int os_lock_file ( int  fd,
int  excl 
)

Definition at line 536 of file file.c.

unsigned os_major ( unsigned long long  dev)

Definition at line 563 of file file.c.

unsigned long long os_makedev ( unsigned  major,
unsigned  minor 
)

Definition at line 573 of file file.c.

unsigned os_minor ( unsigned long long  dev)

Definition at line 568 of file file.c.

int os_mode_fd ( int  fd,
int  mode 
)

Definition at line 116 of file file.c.

int os_open_file ( const char file,
struct openflags  flags,
int  mode 
)

Definition at line 172 of file file.c.

int os_pipe ( int fds,
int  stream,
int  close_on_exec 
)

Definition at line 334 of file file.c.

int os_rcv_fd ( int  fd,
int helper_pid_out 
)

Definition at line 464 of file file.c.

int os_read_file ( int  fd,
void buf,
int  len 
)

Definition at line 251 of file file.c.

int os_seek_file ( int  fd,
unsigned long long  offset 
)

Definition at line 241 of file file.c.

int os_set_exec_close ( int  fd)

Definition at line 323 of file file.c.

int os_set_fd_async ( int  fd)

Definition at line 363 of file file.c.

int os_set_fd_block ( int  fd,
int  blocking 
)

Definition at line 404 of file file.c.

int os_set_slip ( int  fd)

Definition at line 101 of file file.c.

int os_shutdown_socket ( int  fd,
int  r,
int  w 
)

Definition at line 445 of file file.c.

int os_stat_fd ( const int  fd,
struct uml_stat ubuf 
)

Definition at line 36 of file file.c.

int os_stat_file ( const char file_name,
struct uml_stat ubuf 
)

Definition at line 50 of file file.c.

int os_write_file ( int  fd,
const void buf,
int  len 
)

Definition at line 260 of file file.c.