From 6268327ea4056b1497a690d767d86249eb7c6269 Mon Sep 17 00:00:00 2001 From: Uwe Seimet Date: Tue, 24 Aug 2021 22:03:30 +0200 Subject: [PATCH] Extended interface to return whether block size is configurable --- src/raspberrypi/rascsi.cpp | 2 ++ src/raspberrypi/rascsi_interface.proto | 2 ++ src/raspberrypi/rasctl.cpp | 3 +++ 3 files changed, 7 insertions(+) diff --git a/src/raspberrypi/rascsi.cpp b/src/raspberrypi/rascsi.cpp index 605648ff..e88ac060 100644 --- a/src/raspberrypi/rascsi.cpp +++ b/src/raspberrypi/rascsi.cpp @@ -556,6 +556,7 @@ void GetDeviceTypeFeatures(PbServerInfo& serverInfo) types_features->set_type(SCHD); features->set_protectable(true); features->set_supports_file(true); + features->set_supports_block_size(true); types_features = serverInfo.add_types_features(); features = types_features->add_features(); @@ -564,6 +565,7 @@ void GetDeviceTypeFeatures(PbServerInfo& serverInfo) features->set_removable(true); features->set_lockable(true); features->set_supports_file(true); + features->set_supports_block_size(true); types_features = serverInfo.add_types_features(); features = types_features->add_features(); diff --git a/src/raspberrypi/rascsi_interface.proto b/src/raspberrypi/rascsi_interface.proto index 743bb490..b54be04d 100644 --- a/src/raspberrypi/rascsi_interface.proto +++ b/src/raspberrypi/rascsi_interface.proto @@ -61,6 +61,8 @@ message PbDeviceFeatures { bool lockable = 4; // Device supports image file bool supports_file = 5; + // Device supports configurable block size + bool supports_block_size = 6; } // The status of a device diff --git a/src/raspberrypi/rasctl.cpp b/src/raspberrypi/rasctl.cpp index 749a7cd9..cbb0b3fc 100644 --- a/src/raspberrypi/rasctl.cpp +++ b/src/raspberrypi/rasctl.cpp @@ -236,6 +236,9 @@ void CommandServerInfo(const string& hostname, int port) if (features.supports_file()) { cout << " Image file support"; } + if (features.supports_block_size()) { + cout << " Configurable block size"; + } cout << endl; } }