On 02/09/2017 12:20 AM, Vladimir Sementsov-Ogievskiy wrote:
07.02.2017 19:32, Eric Blake wrote:
On 02/03/2017 09:47 AM, Vladimir Sementsov-Ogievskiy wrote:
Split out nbd_receive_simple_option to be reused for structured reply
option.
+ return "<unknown option>";
Can you please consider making this include the %d representation of the
unknown option; perhaps by snprintf'ing into static storage? While it
Hmm.. The caller should free it in this case.
Only if you print it into malloc'd space. I think that printing it into
static storage may be sufficient (although then we have a race if more
than one thread is trying to use that static storage at the same time -
but do we ever have more than one thread trying to handle an error at
the same time?).