Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
parse.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <time.h>
#include <dirent.h>
#include <sys/utsname.h>
#include <sys/types.h>
#include <sys/stat.h>
#include "parse.h"
#include "config.h"

Go to the source code of this file.

Functions

enum sched_prio string_to_prio (const char *str)
 
FILE * prepare_output (const char *dirname)
 
struct configprepare_default_config ()
 
int prepare_config (const char *path, struct config *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.