yast2-core
|
#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) |
string dump_value | ( | int | level, |
const YCPValue & | value | ||
) |
recursively dump value to file
References YCPList::add(), YCPMap::begin(), YCPMap::end(), SystemAgent::Execute(), Y2PathSearch::GENERIC, indent_output(), YCPElement::isNull(), Y2PathSearch::numberOfComponentLevels(), output(), Parser::parse(), parser, path, SystemAgent::Read(), read_file_to_string(), result(), SCRAgent::root(), Y2PathSearch::searchPath(), Parser::setBuffered(), shellcommand(), shellcommand_background(), shellcommand_output(), YCPList::size(), stat2map(), SCRAgent::targetPath(), SystemAgent::tempdir, YCPList::value(), SystemAgent::Write(), y2debug, y2error, y2milestone, ycp2error, ycp2warning, YCPError(), YT_LIST, and YT_MAP.
string indent_output | ( | int | level | ) |
indent output by level
Referenced by dump_value().
|
static |
Read file to string
Referenced by dump_value(), and shellcommand_output().
|
static |
remove directory and all its subfiles and subdirectories. Depth is maximal depth it goes to.
path | path to remove |
depth | max. depth |
References return_one(), y2debug, and y2error.
Referenced by SystemAgent::~SystemAgent().
|
static |
|
static |
Run shell command and returns its output.
References read_file_to_string(), result(), shellcommand(), and y2error.
Referenced by dump_value().
|
static |
Fills a ycp map with informations of a stat structure.
References YCPMap::add(), and result().
Referenced by dump_value().