Extended interface to return whether block size is configurable

This commit is contained in:
Uwe Seimet 2021-08-24 22:03:30 +02:00
parent 13387e1585
commit 6268327ea4
3 changed files with 7 additions and 0 deletions

View File

@ -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();

View File

@ -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

View File

@ -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;
}
}