utility to retrieve aligned sizes from arg strings

Issue #1751
This commit is contained in:
Emery Hemingway 2016-03-29 17:24:03 +02:00 committed by Christian Helmuth
parent e22cd98a4f
commit d1dc5a9071

View File

@ -186,6 +186,15 @@ class Genode::Arg
size_t num_chars = min(dst_len - 1, _value.len());
unpack_string(_value.start(), dst, num_chars);
}
/**
* Retrieve a dataspace (page) aligned size argument
*/
size_t aligned_size() const
{
unsigned long value = ulong_value(0);
return align_addr(value, 12);
}
};