Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

AppUtil.cc File Reference

#include <pwd.h>
#include <grp.h>
#include <signal.h>
#include <unistd.h>
#include <sstream>
#include <iostream>
#include <sys/stat.h>
#include <sys/timeb.h>
#include <sys/time.h>
#include <blocxx/AppenderLogger.hpp>
#include <blocxx/FileAppender.hpp>
#include <blocxx/Logger.hpp>
#include <iomanip>
#include <string>
#include "y2storage/AsciiFile.h"
#include "y2storage/StorageTmpl.h"
#include "y2storage/AppUtil.h"

Defines

#define BUF_SIZE   512

Functions

string dupDash (const string &s)
bool searchFile (AsciiFile &File_Cr, string Pat_Cv, string &Line_Cr)
bool searchFile (AsciiFile &File_Cr, string Pat_Cv, string &Line_Cr, int &LineNr_ir)
void timeMark (const char *const Text_pcv, bool PrintDiff_bi)
void createPath (string Path_Cv)
bool getUid (string Name_Cv, unsigned &Uid_ir)
bool getGid (string Name_Cv, unsigned &Gid_ir)
int getGid (string Name_Cv)
int getUid (string Name_Cv)
bool checkDir (string Path_Cv)
bool checkSymlink (string Path_Cv)
bool checkBlockDevice (string Path_Cv)
bool checkNormalFile (string Path_Cv)
string kbyteToHumanString (unsigned long long sizeK)
string extractNthWord (int Num_iv, string Line_Cv, bool GetRest_bi)
list< string > splitString (const string &s, const string &delChars, bool multipleDelim, bool skipEmpty, const string &quotes)
string mergeString (const list< string > &l, const string &del)
map< string, string > makeMap (const list< string > &l, const string &delim, const string &removeSur)
void putNthWord (int Num_iv, string Word_Cv, string &Line_Cr)
void removeLastIf (string &Text_Cr, char Char_cv)
string normalizeDevice (const string &dev)
void normalizeDevice (string &dev)
string undevDevice (const string &dev)
void undevDevice (string &dev)
void delay (int Microsec_iv)
void removeSurrounding (char Delim_ci, string &Text_Cr)
int compareGt (string Lhs_Cv, string Rhs_Cv)
bool runningFromSystem ()
void log_msg (unsigned level, const char *file, unsigned line, const char *func, const char *add_str, const char *format,...)
int createLogger (const string &component, const string &name, const string &logpath, const string &logfile)

Variables

static blocxx::String component = "libstorage"
bool system_cmd_testmode = false
const string app_ws = " \t\n"

Define Documentation

#define BUF_SIZE   512
 


Function Documentation

bool checkBlockDevice string  Path_Cv  ) 
 

bool checkDir string  Path_Cv  ) 
 

bool checkNormalFile string  Path_Cv  ) 
 

bool checkSymlink string  Path_Cv  ) 
 

int compareGt string  Lhs_Cv,
string  Rhs_Cv
 

int createLogger const string &  component,
const string &  name,
const string &  logpath,
const string &  logfile
 

void createPath string  Path_Cv  ) 
 

void delay int  Microsec_iv  ) 
 

string dupDash const string &  s  ) 
 

string extractNthWord int  Num_iv,
string  Line_Cv,
bool  GetRest_bi
 

int getGid string  Name_Cv  ) 
 

bool getGid string  Name_Cv,
unsigned &  Gid_ir
 

int getUid string  Name_Cv  ) 
 

bool getUid string  Name_Cv,
unsigned &  Uid_ir
 

string kbyteToHumanString unsigned long long  sizeK  ) 
 

void void log_msg unsigned  level,
const char *  file,
unsigned  line,
const char *  func,
const char *  add_str,
const char *  format,
  ...
 

map<string,string> makeMap const list< string > &  l,
const string &  delim,
const string &  removeSur
 

string mergeString const list< string > &  l,
const string &  del
 

void normalizeDevice string &  dev  ) 
 

string normalizeDevice const string &  dev  ) 
 

void putNthWord int  Num_iv,
string  Word_Cv,
string &  Line_Cr
 

void removeLastIf string &  Text_Cr,
char  Char_cv
 

void removeSurrounding char  Delim_ci,
string &  Text_Cr
 

bool runningFromSystem  ) 
 

bool searchFile AsciiFile File_Cr,
string  Pat_Cv,
string &  Line_Cr,
int &  LineNr_ir
 

bool searchFile AsciiFile File_Cr,
string  Pat_Cv,
string &  Line_Cr
 

list<string> splitString const string &  s,
const string &  delChars,
bool  multipleDelim,
bool  skipEmpty,
const string &  quotes
 

void timeMark const char *const   Text_pcv,
bool  PrintDiff_bi
 

void undevDevice string &  dev  ) 
 

string undevDevice const string &  dev  ) 
 


Variable Documentation

const string app_ws = " \t\n"
 

blocxx::String component = "libstorage" [static]
 

bool system_cmd_testmode = false
 


Generated on Wed Sep 14 11:27:07 2005 for yast2-storage by  doxygen 1.4.4