#include <stdio.h>#include <getopt.h>#include <fcntl.h>#include <errno.h>#include <signal.h>#include <sys/sem.h>#include <sys/socket.h>#include <sys/un.h>#include <sys/types.h>#include <pwd.h>#include "y2storage/AppUtil.h"#include "y2storage/StorageInterface.h"#include "y2storage/StorageTypes.h"#include "y2storage/StorageTmpl.h"#include "EvmsAccess.h"Classes | |
| struct | CmdEntry |
Defines | |
| #define | OPT_LOG_PATH 200 |
| #define | OPT_LOG_NAME 201 |
| #define | OPT_LOG_FILE 202 |
| #define | OPT_SOCKET 203 |
| #define | OPT_TIMEOUT 204 |
| #define | OPT_RETRY 205 |
Functions | |
| bool | read_line (int fd, string &line) |
| bool | write_string (int fd, const string &str) |
| int | EvmsCreateCoCmd (EvmsAccess &evms, const string ¶ms) |
| int | EvmsExtendCoCmd (EvmsAccess &evms, const string ¶ms) |
| int | EvmsShrinkCoCmd (EvmsAccess &evms, const string ¶ms) |
| int | EvmsDeleteCoCmd (EvmsAccess &evms, const string ¶ms) |
| int | EvmsCreateLvCmd (EvmsAccess &evms, const string ¶ms) |
| int | EvmsDeleteLvCmd (EvmsAccess &evms, const string ¶ms) |
| int | EvmsResizeLvCmd (EvmsAccess &evms, const string ¶ms) |
| int | EvmsCreateCompatVolume (EvmsAccess &evms, const string ¶ms) |
| int | EvmsActivate (EvmsAccess &evms, const string ¶ms) |
| void | searchExecCmd (const string &cmd, EvmsAccess &evms, const string ¶ms, int fd) |
| void | loop_cin () |
| void | cleanup () |
| void | sigterm_handler (int sig) |
| void | loop_socket (const string &spath, int timeout, const char *ppath) |
| int | main (int argc_iv, char **argv_ppcv) |
Variables | |
| static struct option | LongOpt_arm [] |
| static CmdEntry | cmds [] |
| static string | spath |
| static int | semid = -1 |
| static int | lsock = -1 |
| #define OPT_LOG_FILE 202 |
| #define OPT_LOG_NAME 201 |
| #define OPT_LOG_PATH 200 |
| #define OPT_RETRY 205 |
| #define OPT_SOCKET 203 |
| #define OPT_TIMEOUT 204 |
| void cleanup | ( | ) |
| int EvmsActivate | ( | EvmsAccess & | evms, | |
| const string & | params | |||
| ) |
| int EvmsCreateCoCmd | ( | EvmsAccess & | evms, | |
| const string & | params | |||
| ) |
| int EvmsCreateCompatVolume | ( | EvmsAccess & | evms, | |
| const string & | params | |||
| ) |
| int EvmsCreateLvCmd | ( | EvmsAccess & | evms, | |
| const string & | params | |||
| ) |
| int EvmsDeleteCoCmd | ( | EvmsAccess & | evms, | |
| const string & | params | |||
| ) |
| int EvmsDeleteLvCmd | ( | EvmsAccess & | evms, | |
| const string & | params | |||
| ) |
| int EvmsExtendCoCmd | ( | EvmsAccess & | evms, | |
| const string & | params | |||
| ) |
| int EvmsResizeLvCmd | ( | EvmsAccess & | evms, | |
| const string & | params | |||
| ) |
| int EvmsShrinkCoCmd | ( | EvmsAccess & | evms, | |
| const string & | params | |||
| ) |
| void loop_cin | ( | ) |
| void loop_socket | ( | const string & | spath, | |
| int | timeout, | |||
| const char * | ppath | |||
| ) |
| int main | ( | int | argc_iv, | |
| char ** | argv_ppcv | |||
| ) |
| bool read_line | ( | int | fd, | |
| string & | line | |||
| ) |
| void searchExecCmd | ( | const string & | cmd, | |
| EvmsAccess & | evms, | |||
| const string & | params, | |||
| int | fd | |||
| ) |
| void sigterm_handler | ( | int | sig | ) |
| bool write_string | ( | int | fd, | |
| const string & | str | |||
| ) |
Initial value:
{
{ "create_co", EvmsCreateCoCmd },
{ "extend_co", EvmsExtendCoCmd },
{ "shrink_co", EvmsShrinkCoCmd },
{ "delete_co", EvmsDeleteCoCmd },
{ "create_lv", EvmsCreateLvCmd },
{ "delete_lv", EvmsDeleteLvCmd },
{ "resize_lv", EvmsResizeLvCmd },
{ "cc_vol", EvmsCreateCompatVolume },
{ "activate", EvmsActivate }
}
struct option LongOpt_arm[] [static] |
Initial value:
{
{ "log-path", required_argument, NULL, OPT_LOG_PATH },
{ "log-name", required_argument, NULL, OPT_LOG_NAME },
{ "log-file", required_argument, NULL, OPT_LOG_FILE },
{ "retry", no_argument, NULL, OPT_RETRY },
{ "socket", required_argument, NULL, OPT_SOCKET },
{ "timeout", required_argument, NULL, OPT_TIMEOUT }
}
int lsock = -1 [static] |
int semid = -1 [static] |
string spath [static] |
1.5.0