OSDN Git Service

qdev-properties: make blocksize accept size suffixes
authorRoman Kagan <rvkagan@yandex-team.ru>
Thu, 28 May 2020 22:55:13 +0000 (01:55 +0300)
committerKevin Wolf <kwolf@redhat.com>
Wed, 17 Jun 2020 12:53:40 +0000 (14:53 +0200)
commit645b55d1c2bf35ce6344f1f472fa30e327cafce0
treec2ced41bd84866014d98cc61a3b288f22fdce0f1
parent914e74cda9a54ac860000aa18882dc40d3c8180b
qdev-properties: make blocksize accept size suffixes

It appears convenient to be able to specify physical_block_size and
logical_block_size using common size suffixes.

Teach the blocksize property setter to interpret them.  Also express the
upper and lower limits in the respective units.

Signed-off-by: Roman Kagan <rvkagan@yandex-team.ru>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20200528225516.1676602-6-rvkagan@yandex-team.ru>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
hw/core/qdev-properties.c