Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Functions
parse.h File Reference

Go to the source code of this file.

Data Structures

struct  config
 

Functions

enum sched_prio string_to_prio (const char *str)
 
FILE * prepare_output (const char *dir)
 
int prepare_config (const char *path, struct config *config)
 
struct configprepare_default_config ()
 

Function Documentation

int prepare_config ( const char path,
struct config config 
)

parses config file and returns the config to the caller

Parameters
pathconfig file name
Return values
1on error
0on success

Definition at line 158 of file parse.c.

struct config* prepare_default_config ( )
read

returns the default config

Return values
defaultconfig on success
NULLwhen the output file can't be created

Definition at line 123 of file parse.c.

FILE* prepare_output ( const char dirname)

create and open logfile

Parameters
dirdirectory in which the logfile should be created
Return values
logfileon success
NULLwhen the file can't be created

Definition at line 64 of file parse.c.

enum sched_prio string_to_prio ( const char str)

converts priority string to priority

Parameters
strstring that represents a scheduler priority
Return values
priority
SCHED_ERRwhen the priority doesn't exit

Definition at line 43 of file parse.c.