powerlib.c File Reference

#include "config.h"
#include <unistd.h>
#include <dirent.h>
#include <stdio.h>
#include <errno.h>
#include <string.h>
#include <stdarg.h>
#include <ctype.h>
#include "powerlib_local.h"
#include "powerlib.h"

Defines

#define ACPI_PROC   "/proc/acpi"
#define APM_PROC   "/proc/apm"

Functions

int checkACPI ()
 determine whether there is apm, acpi or nothing on your Computer
int getDevicesNum (const char *dir_name)
 get amount of entries in a directory
int getColonValue (FILE *file, char *value, const size_t value_size, char *def, const size_t def_size)
 get next value which is seperated by a colon
int getDirEntry (const int num, char *file, const size_t size_file, const char *dir_in)
 get a directory entry
int _write_line (const char *filename, const char *fmt,...)
 write a line to a file
int read_apm_info (apm_info *i)
 reads out information from /proc/apm
int check_ACPI_dir (const char *directory)
 check whether module has been loaded and device is available

Variables

static int isACPI = NOT_SUPPORTED

Define Documentation

#define ACPI_PROC   "/proc/acpi"
 

#define APM_PROC   "/proc/apm"
 


Variable Documentation

int isACPI = NOT_SUPPORTED [static]
 


Generated on Mon Mar 27 09:27:19 2006 for Powersave Daemon by  doxygen 1.4.6