yast2-core
Functions
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 <sstream>
#include <stdexcept>
#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 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 &target_root, 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 
)
string indent_output ( int  level)

indent output by level

Referenced by dump_value().

static int read_file_to_string ( const char *  filename,
string &  output 
)
static

Read file to string

Referenced by shellcommand_output().

static 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
pathpath to remove
depthmax. depth

References return_one(), y2debug, and y2error.

Referenced by SystemAgent::~SystemAgent().

static int return_one ( const struct dirent *  entry)
static

Filter . and ..

Returns
0 if . or .. are file names

Referenced by remove_directory().

static YCPMap shellcommand_output ( const string &  target_root,
const string &  script,
const string &  tempdir 
)
static

Run shell command and returns its output.

References YCPMap::add(), read_file_to_string(), shellcommand(), and y2error.

static YCPMap stat2map ( const struct stat &  sb)
static

Fills a ycp map with informations of a stat structure.

References YCPMap::add().


Generated on a sunny day for yast2-core by doxygen 1.8.8