nbd: Fix interpretation of the export flags
commit48c7d80de8863e3436b3b5d5676018b2afaec161
authorMax Reitz <mreitz@redhat.com>
Wed, 25 Feb 2015 18:08:32 +0000 (25 13:08 -0500)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 18 Mar 2015 11:07:11 +0000 (18 12:07 +0100)
treeea852d59333bedc0694878f566b265479c66352b
parent9c122adadbf4377eb77195b3944be10a59d9484f
nbd: Fix interpretation of the export flags

The export flags are a 16 bit value, so be16_to_cpu() has to be used to
interpret them correctly. This makes discard and flush actually work
for named NBD exports (they did not work before, because the client
always assumed them to be unsupported because of the bug fixed by this
patch).

Signed-off-by: Max Reitz <mreitz@redhat.com>
Message-Id: <1424887718-10800-20-git-send-email-mreitz@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
nbd.c