SystemAgent.cc File Reference

#include "config.h"
#include <dirent.h>
#include <errno.h>
#include <fcntl.h>
#include <netdb.h>
#include <resolv.h>
#include <signal.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <linux/lp.h>
#include <string>
#include <YCP.h>
#include <ycp/pathsearch.h>
#include <ycp/Parser.h>
#include <ycp/y2log.h>
#include "SystemAgent.h"
#include "ShellCommand.h"

Functions

static int return_one (const struct dirent *entry)
static const void remove_directory (const string &path, int depth)
static int read_file_to_string (const char *filename, string &output)
static YCPMap stat2map (const struct stat &sb)
static YCPMap shellcommand_output (const string &script, const string &tempdir)
string indent_output (int level)
string dump_value (int level, const YCPValue &value)

Function Documentation

string dump_value int  level,
const YCPValue value
 

recursively dump value to file

string indent_output int  level  ) 
 

indent output by level

static int read_file_to_string const char *  filename,
string &  output
[static]
 

Read file to string

static const void remove_directory const string &  path,
int  depth
[static]
 

remove directory and all its subfiles and subdirectories. Depth is maximal depth it goes to.

Parameters:
path path to remove
depth max. depth

static int return_one const struct dirent *  entry  )  [static]
 

Filter . and ..

Returns:
0 if . or .. are file names

static YCPMap shellcommand_output const string &  script,
const string &  tempdir
[static]
 

Run shell command and returns its output.

static YCPMap stat2map const struct stat &  sb  )  [static]
 

Fills a ycp map with informations of a stat structure.


Generated on Fri Jun 16 18:07:45 2006 for yast2-core by  doxygen 1.4.6