improve rlimit (-R) cli
Currently the limit resource must be specified using an integer.
e.g. In order to set RLIMIT_STACK, you have to look up the value
in the headers and find "3", then use that. In addition to being
a pita, this isn't portable across architectures. So lets reuse
our existing constants parsing logic so people can write constants
directly via -R.
Further, the limit values currently must be specified using base
10 which isn't natural for certain resources (like memory). Allow
people to specify values with hex like 0x10000. This will break
people who were using decimal numbers with leading zeros (which
now get interpreted as octals), but no one seems to be doing that,
and it would look odd in the first place.
Bug: None
Test: unittests pass
Change-Id: I7927bc277c7a0e644062367df002ffed5cbd31dd
4 files changed