src/rdd_internals.h File Reference

#include <stdarg.h>
#include <stdlib.h>

Include dependency graph for rdd_internals.h:

This graph shows which files directly or indirectly include this file:

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 Documentation

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


Function Documentation

int rdd_ask ( char *  fmt,
  ... 
)

Definition at line 142 of file console.c.

References rdd_vask().

Here is the call graph for this function:

int rdd_buf2hex ( const unsigned char *  buf,
unsigned  bufsize,
char *  hexbuf,
unsigned  hexbuflen 
)

Definition at line 121 of file rdd_internals.c.

References RDD_ESPACE, and RDD_OK.

void rdd_catch_signals ( void   ) 

Definition at line 226 of file rdd_internals.c.

References set_signal_handler(), and signal_exit().

Here is the call graph for this function:

void rdd_cons_close ( void   ) 

Definition at line 91 of file console.c.

References console_fd.

void rdd_cons_open ( void   ) 

Definition at line 81 of file console.c.

References console_fd, and unix_error().

Here is the call graph for this function:

void rdd_cons_printf ( char *  fmt,
  ... 
)

Definition at line 185 of file console.c.

References rdd_cons_vprintf().

Here is the call graph for this function:

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.

Here is the call graph for this function:

char* rdd_ctime ( void   ) 

Definition at line 144 of file rdd_internals.c.

References error(), TIME_BUF_SIZE, TIME_FORMAT, and unix_error().

Here is the call graph for this function:

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().

Here is the call graph for this function:

void rdd_init ( void   ) 

Definition at line 95 of file rdd_internals.c.

References check_type_sizes().

Here is the call graph for this function:

void* rdd_malloc ( size_t  nbyte  ) 

Allocates memory and clears it.

Definition at line 103 of file rdd_internals.c.

References error().

Here is the call graph for this function:

void rdd_quit_if ( int  quit_answer,
char *  fmt,
  ... 
)

Definition at line 154 of file console.c.

References quiet, and rdd_vask().

Here is the call graph for this function:

void rdd_set_quiet ( int  q  ) 

Definition at line 54 of file console.c.

References quiet.

int rdd_strerror ( int  rc,
char *  buf,
unsigned  bufsize 
)

Definition at line 103 of file strerror.c.

References copymsg(), get_message(), and RDD_BADARG.

Here is the call graph for this function:

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.

Here is the call graph for this function:

int timeUnits ( double  timeInSecs,
int *  secs,
int *  mins,
int *  hours,
int *  days 
)

Definition at line 291 of file rdd_internals.c.

References RDD_BADARG, and RDD_OK.


Generated on Sun Feb 6 12:36:24 2011 for rdd by  doxygen 1.5.6