From f5c5479faa0ed7b22a67e8b75f58f71adb78c21e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20S=C3=B6ntgen?= Date: Fri, 9 Aug 2019 15:36:16 +0200 Subject: [PATCH] ram_block: use Number_of_bytes to parse block size Using this helper rather than parsing as size_t directly allows use to use size suffixes, e.g. K, M, G. Fixes #3540. --- repos/os/src/server/ram_block/main.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/repos/os/src/server/ram_block/main.cc b/repos/os/src/server/ram_block/main.cc index 4ef851fffa..b146056680 100644 --- a/repos/os/src/server/ram_block/main.cc +++ b/repos/os/src/server/ram_block/main.cc @@ -174,7 +174,8 @@ struct Main size = config.attribute_value("size", Number_of_bytes()); } - block_size = config.attribute_value("block_size", block_size); + block_size = config.attribute_value("block_size", + Number_of_bytes(block_size)); } Block::Driver *create() override