From ed46262cca5dca332c17525d83f4821b7be835d3 Mon Sep 17 00:00:00 2001 From: Uwe Seimet <48174652+uweseimet@users.noreply.github.com> Date: Wed, 2 Feb 2022 05:52:49 +0100 Subject: [PATCH] Added configurable network interface name support to rascsi (#635) * Added support for explicit network interface name to rascsi * Fixed patch_version for development build --- src/raspberrypi/rascsi.cpp | 9 ++++++++- src/raspberrypi/rascsi_version.cpp | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/raspberrypi/rascsi.cpp b/src/raspberrypi/rascsi.cpp index 4ab4f1a5..b05600fe 100644 --- a/src/raspberrypi/rascsi.cpp +++ b/src/raspberrypi/rascsi.cpp @@ -1299,7 +1299,14 @@ bool ParseArgument(int argc, char* argv[], int& port) device->set_unit(unit); device->set_type(type); device->set_block_size(block_size); - AddParam(*device, "file", optarg); + + // Either interface or file parameters are supported + if (device_factory.GetDefaultParams(type).count("interfaces")) { + AddParam(*device, "interfaces", optarg); + } + else { + AddParam(*device, "file", optarg); + } size_t separator_pos = name.find(':'); if (separator_pos != string::npos) { diff --git a/src/raspberrypi/rascsi_version.cpp b/src/raspberrypi/rascsi_version.cpp index 15eb4607..de8c694a 100644 --- a/src/raspberrypi/rascsi_version.cpp +++ b/src/raspberrypi/rascsi_version.cpp @@ -14,7 +14,7 @@ // The following should be updated for each release const int rascsi_major_version = 22; // Last two digits of year 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"