block: Use a GString in bdrv_perm_names()
commite2a7423a119660f33abcbbf4b7827a81ef23872f
authorAlberto Garcia <berto@igalia.com>
Fri, 10 Jan 2020 17:15:18 +0000 (10 18:15 +0100)
committerMax Reitz <mreitz@redhat.com>
Thu, 6 Feb 2020 12:47:45 +0000 (6 13:47 +0100)
tree3c1b875b6bf423922b3a8a1c5032011682e4f9ac
parent3a75a870ef51f79c2b5f7fc8f7756f9efb500a14
block: Use a GString in bdrv_perm_names()

This is a bit more efficient than having to allocate and free memory
for each new permission.

The default size (30) is enough for "consistent read, write, resize".

Signed-off-by: Alberto Garcia <berto@igalia.com>
Message-id: 20200110171518.22168-1-berto@igalia.com
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>
block.c