#include <stdarg.h>
#include <stdlib.h>
Go to the source code of this file.
Defines | |
#define | RDD_MAX_FILENAMESIZE 256 |
#define | RDD_NO 0 |
#define | RDD_SECTOR_SIZE 512 |
#define | RDD_YES 1 |
#define | streq(s1, s2) (strcmp(s1, s2) == 0) |
Functions | |
int | rdd_ask (char *fmt,...) |
int | rdd_buf2hex (const unsigned char *buf, unsigned bufsize, char *hexbuf, unsigned hexbuflen) |
void | rdd_catch_signals (void) |
void | rdd_cons_close (void) |
void | rdd_cons_open (void) |
void | rdd_cons_printf (char *fmt,...) |
void | rdd_cons_vprintf (char *fmt, va_list ap) |
char * | rdd_ctime (void) |
int | rdd_device_size (const char *path, rdd_count_t *size) |
void | rdd_free (void *p) |
double | rdd_gettime (void) |
void | rdd_init (void) |
void * | rdd_malloc (size_t sz) |
void | rdd_quit_if (int quit_answer, char *fmt,...) |
void | rdd_set_quiet (int q) |
int | rdd_strerror (int rc, char *buf, unsigned bufsize) |
char * | rdd_strsize (rdd_count_t sz) |
int | timeUnits (double timeInSecs, int *secs, int *mins, int *hours, int *days) |
#define RDD_MAX_FILENAMESIZE 256 |
Definition at line 41 of file rdd_internals.h.
#define RDD_NO 0 |
Definition at line 45 of file rdd_internals.h.
#define RDD_SECTOR_SIZE 512 |
Definition at line 43 of file rdd_internals.h.
#define RDD_YES 1 |
Definition at line 46 of file rdd_internals.h.
#define streq | ( | s1, | |||
s2 | ) | (strcmp(s1, s2) == 0) |
Definition at line 39 of file rdd_internals.h.
int rdd_ask | ( | char * | fmt, | |
... | ||||
) |
Definition at line 142 of file console.c.
References rdd_vask().
int rdd_buf2hex | ( | const unsigned char * | buf, | |
unsigned | bufsize, | |||
char * | hexbuf, | |||
unsigned | hexbuflen | |||
) |
void rdd_catch_signals | ( | void | ) |
Definition at line 226 of file rdd_internals.c.
References set_signal_handler(), and signal_exit().
void rdd_cons_close | ( | void | ) |
void rdd_cons_open | ( | void | ) |
Definition at line 81 of file console.c.
References console_fd, and unix_error().
void rdd_cons_printf | ( | char * | fmt, | |
... | ||||
) |
Definition at line 185 of file console.c.
References rdd_cons_vprintf().
void rdd_cons_vprintf | ( | char * | fmt, | |
va_list | ap | |||
) |
Writes a formatted message to the console if the console is open. Be careful: do not (recursively) invoke any error routines here.
Definition at line 169 of file console.c.
References cons_write(), console_fd, and MAX_WRITEBUF.
char* rdd_ctime | ( | void | ) |
Definition at line 144 of file rdd_internals.c.
References error(), TIME_BUF_SIZE, TIME_FORMAT, and unix_error().
int rdd_device_size | ( | const char * | path, | |
rdd_count_t * | size | |||
) |
Definition at line 251 of file rdd_internals.c.
References RDD_EOPEN, RDD_ESEEK, RDD_OK, and RDD_WHOLE_FILE.
void rdd_free | ( | void * | p | ) |
Definition at line 115 of file rdd_internals.c.
double rdd_gettime | ( | void | ) |
Definition at line 167 of file rdd_internals.c.
References unix_error().
void rdd_init | ( | void | ) |
Definition at line 95 of file rdd_internals.c.
References check_type_sizes().
void* rdd_malloc | ( | size_t | nbyte | ) |
Allocates memory and clears it.
Definition at line 103 of file rdd_internals.c.
References error().
void rdd_quit_if | ( | int | quit_answer, | |
char * | fmt, | |||
... | ||||
) |
Definition at line 154 of file console.c.
References quiet, and rdd_vask().
int rdd_strerror | ( | int | rc, | |
char * | buf, | |||
unsigned | bufsize | |||
) |
Definition at line 103 of file strerror.c.
References copymsg(), get_message(), and RDD_BADARG.
char* rdd_strsize | ( | rdd_count_t | sz | ) |
Definition at line 179 of file rdd_internals.c.
References bug(), MAX_SIZE_BUF_LEN, and RDD_WHOLE_FILE.
int timeUnits | ( | double | timeInSecs, | |
int * | secs, | |||
int * | mins, | |||
int * | hours, | |||
int * | days | |||
) |