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 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 dbg ( _lvl,
_fmt,
_args...   ) 

Value:

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

#define dbg1 ( _fmt,
_args...   ) 

#define EXTENDED_DELAY_MAX   9905

Referenced by handle_delay().

#define EXTENDED_DELAY_MIN   9900

Referenced by handle_delay().

#define PAGE_SIZE   4096

#define RC_BUSY   -2

Referenced by handle_delay().


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

Referenced by do_rtas_op(), procfs_interface_exists(), read_kregion_bounds(), and sc_interface_exists().

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

References BLOCK_SIZE, and dbg1.

Referenced by get_property(), and read_kregion_bounds().

int rtas_token ( const char *  call_name  ) 

rtas_token

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

References get_property(), ofdt_rtas_path, and RTAS_UNKNOWN_OP.


Variable Documentation


Generated on Sat Jun 7 04:46:30 2008 for librtas by  doxygen 1.5.5