Tor 0.4.9.0-alpha-dev
|
#include <stddef.h>
Go to the source code of this file.
Functions | |
off_t | tor_fd_getpos (int fd) |
int | tor_fd_setpos (int fd, off_t pos) |
int | tor_fd_seekend (int fd) |
int | tor_ftruncate (int fd) |
int | write_all_to_fd_minimal (int fd, const char *buf, size_t count) |
off_t tor_fd_getpos | ( | int | fd | ) |
Return the position of fd with respect to the start of the file.
Definition at line 48 of file fdio.c.
Referenced by log_tor_version().
int tor_fd_seekend | ( | int | fd | ) |
Move fd to the end of the file. Return -1 on error, 0 on success. If the file is a pipe, do nothing and succeed.
Definition at line 61 of file fdio.c.
Referenced by add_file_log().
int tor_fd_setpos | ( | int | fd, |
off_t | pos | ||
) |
Move fd to position pos in the file. Return -1 on error, 0 on success.
Definition at line 80 of file fdio.c.
Referenced by tor_ftruncate().
int tor_ftruncate | ( | int | fd | ) |
Replacement for ftruncate(fd, 0): move to the front of the file and remove all the rest of the file. Return -1 on error, 0 on success.
Definition at line 92 of file fdio.c.
Referenced by truncate_logs().
int write_all_to_fd_minimal | ( | int | fd, |
const char * | buf, | ||
size_t | count | ||
) |
Minimal version of write_all, for use by logging.
Definition at line 108 of file fdio.c.
Referenced by log_tor_version().