Changed max component length for host and svod types
This commit is contained in:
parent
5ce75a1479
commit
a190bf9fd8
|
@ -33,7 +33,7 @@ class HostPathDevice : public Device {
|
|||
|
||||
const std::string& name() const override { return name_; }
|
||||
uint32_t attributes() const override { return 0; }
|
||||
uint32_t component_name_max_length() const override { return 40; }
|
||||
uint32_t component_name_max_length() const override { return 255; }
|
||||
|
||||
uint32_t total_allocation_units() const override { return 128 * 1024; }
|
||||
uint32_t available_allocation_units() const override { return 128 * 1024; }
|
||||
|
|
|
@ -50,6 +50,7 @@ StfsContainerDevice::StfsContainerDevice(const std::string_view mount_path,
|
|||
name_("STFS"),
|
||||
host_path_(host_path),
|
||||
files_total_size_(),
|
||||
component_name_max_length_(40),
|
||||
svod_base_offset_(),
|
||||
header_(),
|
||||
svod_layout_(),
|
||||
|
@ -85,6 +86,7 @@ bool StfsContainerDevice::Initialize() {
|
|||
return ReadSTFS() == Error::kSuccess;
|
||||
break;
|
||||
case XContentVolumeType::kSvod:
|
||||
component_name_max_length_ = 255;
|
||||
return ReadSVOD() == Error::kSuccess;
|
||||
default:
|
||||
XELOGE("Unknown XContent volume type: {}",
|
||||
|
|
|
@ -48,7 +48,9 @@ class StfsContainerDevice : public Device {
|
|||
|
||||
const std::string& name() const override { return name_; }
|
||||
uint32_t attributes() const override { return 0; }
|
||||
uint32_t component_name_max_length() const override { return 40; }
|
||||
uint32_t component_name_max_length() const override {
|
||||
return component_name_max_length_;
|
||||
}
|
||||
|
||||
uint32_t total_allocation_units() const override {
|
||||
if (header_.metadata.volume_type == XContentVolumeType::kStfs) {
|
||||
|
@ -132,6 +134,7 @@ class StfsContainerDevice : public Device {
|
|||
size_t files_total_size_;
|
||||
|
||||
size_t svod_base_offset_;
|
||||
uint32_t component_name_max_length_;
|
||||
|
||||
std::unique_ptr<Entry> root_entry_;
|
||||
StfsHeader header_;
|
||||
|
|
Loading…
Reference in New Issue