[Qemu-devel] [PATCH for-4.1] qemu-nbd: Look up flag names in array

2019-04-05 Thread Max Reitz
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 --- Looking at the diff stat I can't claim this patch real

Re: [Qemu-devel] [PATCH for-4.1] qemu-nbd: Look up flag names in array

2019-04-05 Thread Eric Blake
On 4/5/19 2:16 PM, Max Reitz wrote: > 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. At one point, I even considered using a QA