librtas_src/common.h File Reference

#include <stdio.h>
#include <stdint.h>

Go to the source code of this file.

Data Structures

struct  rtas_operations
struct  librtas_config

Defines

#define RC_BUSY   -2
#define EXTENDED_DELAY_MIN   9900
#define EXTENDED_DELAY_MAX   9905
#define PAGE_SIZE   4096
#define RETURN(_rc)
#define CLEANUP(_rc, _label)
#define dbg(_lvl, _fmt, _args...)
#define dbg1(_fmt, _args...)

Functions

int open_proc_rtas_file (const char *name, int mode)
 Open the proc rtas file.
int rtas_token (const char *call_name)
 Retrive a rtas token for a given name.
int read_entire_file (int fd, char **buf, size_t *len)
 Read in an entire file into the supplied buffer.

Variables

struct librtas_config config


Detailed Description

Copyright (C) 2005 IBM Corporation Common Public License Version 1.0 (see COPYRIGHT)

Author:
John Rose <johnrose@us.ibm.com>

Define Documentation

#define CLEANUP ( _rc,
_label   ) 

Value:

if (_rc < 0)            \
                goto _label

#define dbg ( _lvl,
_fmt,
_args...   ) 

Value:

do {                                                            \
                if (config.debug >= _lvl)                               \
                        printf("librtas %s(): " _fmt, __FUNCTION__, ##_args); \
        } while (0)

#define dbg1 ( _fmt,
_args...   ) 

Value:

do {                                                            \
                dbg(1, _fmt, ##_args);                                  \
        } while (0)                                                     \

#define EXTENDED_DELAY_MAX   9905

#define EXTENDED_DELAY_MIN   9900

#define PAGE_SIZE   4096

#define RC_BUSY   -2

#define RETURN ( _rc   ) 

Value:

if (_rc < 0)            \
                return _rc


Function Documentation

int open_proc_rtas_file ( const char *  name,
int  mode 
)

open_proc_rtas_file

Parameters:
name filename to open
mode mode to open file in
Returns:
results of open() call

int read_entire_file ( int  fd,
char **  buf,
size_t *  len 
)

read_entire_file

Parameters:
fd opened file descriptor for file to read
buf buffer to read file into
len variable to return amount read into buffer
Returns:
0 on success, !0 otherwise

int rtas_token ( const char *  call_name  ) 

rtas_token

Parameters:
call_name rtas name to retrieve token for
Returns:
0 on success, !0 otherwise


Variable Documentation

struct librtas_config config


Generated on Sat Sep 22 08:52:51 2007 for librtas by  doxygen 1.5.3