#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 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 } } |
|
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 } } |
|
|
|
|
|
|