#include <stdlib.h>#include <fcntl.h>#include <unistd.h>#include <string.h>#include <errno.h>#include "librtas.h"#include "common.h"Defines | |
| #define | BLOCK_SIZE 4096 |
Functions | |
| static int | open_prop_file (const char *prop_path, const char *prop_name, int *fd) |
| Open the property name located at the specified property path. | |
| static int | get_property (const char *prop_path, const char *prop_name, char **prop_val, size_t *prop_len) |
| Open a property file and read in its contents. | |
| 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 | |
| static const char * | ofdt_rtas_path = "/proc/device-tree/rtas" |
| #define BLOCK_SIZE 4096 |
| static int get_property | ( | const char * | prop_path, | |
| const char * | prop_name, | |||
| char ** | prop_val, | |||
| size_t * | prop_len | |||
| ) | [static] |
get_property
| prop_path | path to the property file | |
| prop_name | propery name | |
| prop_val | ||
| prop_len |
| static int open_prop_file | ( | const char * | prop_path, | |
| const char * | prop_name, | |||
| int * | fd | |||
| ) | [static] |
open_prop_file
| prop_path | path to the property name | |
| prop_name | property name | |
| fd | reference to file descriptor |
| int read_entire_file | ( | int | fd, | |
| char ** | buf, | |||
| size_t * | len | |||
| ) |
read_entire_file
| fd | opened file descriptor for file to read | |
| buf | buffer to read file into | |
| len | variable to return amount read into buffer |
| int rtas_token | ( | const char * | call_name | ) |
rtas_token
| call_name | rtas name to retrieve token for |
const char* ofdt_rtas_path = "/proc/device-tree/rtas" [static] |
1.5.3