qemu-nbd: Look up flag names in array
commitc4e2aff81bef7310a4139707f8f880dbd2bab6b4
authorMax Reitz <mreitz@redhat.com>
Fri, 5 Apr 2019 19:16:35 +0000 (5 21:16 +0200)
committerEric Blake <eblake@redhat.com>
Tue, 7 May 2019 14:43:42 +0000 (7 09:43 -0500)
tree7783b9d60074a03cfffd7f1d4738d7222681f400
parent19eb2d4e736dc895f31fbd6b520e514f10cc08e0
qemu-nbd: Look up flag names in array

The existing code to convert flag bits into strings looks a bit strange
now, and if we ever add more flags, it will look even stranger.  Prevent
that from happening by making it look up the flag names in an array.

Signed-off-by: Max Reitz <mreitz@redhat.com>
Message-Id: <20190405191635.25740-1-mreitz@redhat.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
include/block/nbd.h
qemu-nbd.c