mirror of
https://github.com/akuker/RASCSI.git
synced 2024-12-29 14:29:54 +00:00
Manpage update
This commit is contained in:
parent
29603a327a
commit
4fc8f67975
@ -6,6 +6,7 @@ rasctl \- Sends management commands to the rascsi process
|
||||
\fB\-e\fR |
|
||||
\fB\-l\fR |
|
||||
\fB\-m\fR |
|
||||
\fB\-o\fR |
|
||||
\fB\-s\fR |
|
||||
\fB\-v\fR |
|
||||
\fB\-D\fR |
|
||||
|
@ -6,8 +6,8 @@ NAME
|
||||
rasctl - Sends management commands to the rascsi process
|
||||
|
||||
SYNOPSIS
|
||||
rasctl -e | -l | -m | -s | -v | -D | -I | -L | -O | -P | -T | -V | -X |
|
||||
[-C FILENAME:FILESIZE] [-E FILENAME] [-F IMAGE_FOLDER] [-R CUR‐
|
||||
rasctl -e | -l | -m | -o | -s | -v | -D | -I | -L | -O | -P | -T | -V |
|
||||
-X | [-C FILENAME:FILESIZE] [-E FILENAME] [-F IMAGE_FOLDER] [-R CUR‐
|
||||
RENT_NAME:NEW_NAME] [-c CMD] [-f FILE|PARAM] [-g LOG_LEVEL] [-h HOST]
|
||||
[-i ID [-n NAME] [-p PORT] [-r RESERVED_IDS] [-t TYPE] [-u UNIT] [-x
|
||||
CURRENT_NAME:NEW_NAME]
|
||||
|
@ -155,7 +155,7 @@ void RascsiResponse::GetAvailableImages(PbImageFilesInfo& image_files_info, cons
|
||||
while ((dir = readdir(d))) {
|
||||
string filename = folder + "/" + dir->d_name;
|
||||
|
||||
string name_lower = filename;
|
||||
string name_lower = dir->d_name;
|
||||
if (!file_pattern.empty()) {
|
||||
transform(name_lower.begin(), name_lower.end(), name_lower.begin(), ::tolower);
|
||||
}
|
||||
|
@ -91,6 +91,23 @@ PbDeviceType ParseType(const char *optarg)
|
||||
}
|
||||
}
|
||||
|
||||
void SetPatternParams(PbCommand& command, const string& patterns)
|
||||
{
|
||||
string folder_pattern;
|
||||
string file_pattern;
|
||||
size_t separator_pos = patterns.find(COMPONENT_SEPARATOR);
|
||||
if (separator_pos != string::npos) {
|
||||
folder_pattern = patterns.substr(0, separator_pos);
|
||||
file_pattern = patterns.substr(separator_pos + 1);
|
||||
}
|
||||
else {
|
||||
file_pattern = patterns;
|
||||
}
|
||||
|
||||
AddParam(command, "folder_pattern", folder_pattern);
|
||||
AddParam(command, "file_pattern", file_pattern);
|
||||
}
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
GOOGLE_PROTOBUF_VERIFY_VERSION;
|
||||
@ -139,7 +156,7 @@ int main(int argc, char* argv[])
|
||||
|
||||
opterr = 1;
|
||||
int opt;
|
||||
while ((opt = getopt(argc, argv, "elmsvDINOTVXa:b:c:d:f:h:i:n:p:r:t:u:x:C:E:F:L:R:P::")) != -1) {
|
||||
while ((opt = getopt(argc, argv, "e::lmsvDINOTVXa:b:c:d:f:h:i:n:p:r:t:u:x:C:E:F:L:P::R:")) != -1) {
|
||||
switch (opt) {
|
||||
case 'i': {
|
||||
int id;
|
||||
@ -199,6 +216,9 @@ int main(int argc, char* argv[])
|
||||
|
||||
case 'e':
|
||||
command.set_operation(DEFAULT_IMAGE_FILES_INFO);
|
||||
if (optarg) {
|
||||
SetPatternParams(command, optarg);
|
||||
}
|
||||
break;
|
||||
|
||||
case 'F':
|
||||
|
Loading…
Reference in New Issue
Block a user