Added configurable network interface name support to rascsi (#635)

* Added support for explicit network interface name to rascsi

* Fixed patch_version for development build
This commit is contained in:
Uwe Seimet 2022-02-02 05:52:49 +01:00 committed by GitHub
parent 0e6e710e52
commit ed46262cca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 2 deletions

View File

@ -1299,7 +1299,14 @@ bool ParseArgument(int argc, char* argv[], int& port)
device->set_unit(unit); device->set_unit(unit);
device->set_type(type); device->set_type(type);
device->set_block_size(block_size); device->set_block_size(block_size);
// Either interface or file parameters are supported
if (device_factory.GetDefaultParams(type).count("interfaces")) {
AddParam(*device, "interfaces", optarg);
}
else {
AddParam(*device, "file", optarg); AddParam(*device, "file", optarg);
}
size_t separator_pos = name.find(':'); size_t separator_pos = name.find(':');
if (separator_pos != string::npos) { if (separator_pos != string::npos) {

View File

@ -14,7 +14,7 @@
// The following should be updated for each release // The following should be updated for each release
const int rascsi_major_version = 22; // Last two digits of year const int rascsi_major_version = 22; // Last two digits of year
const int rascsi_minor_version = 01; // Month const int rascsi_minor_version = 01; // Month
const int rascsi_patch_version = 01; // Patch number - increment for each update const int rascsi_patch_version = -1; // Patch number - increment for each update
static char rascsi_version_string[30]; // Allow for string up to "XX.XX.XXX" + null character + "development build" static char rascsi_version_string[30]; // Allow for string up to "XX.XX.XXX" + null character + "development build"