states: Log the error when handle enters %DEAD state
commite34bb8293ed9be2b8521ddead2f8e2db07a8e080
authorRichard W.M. Jones <rjones@redhat.com>
Thu, 9 Mar 2023 22:23:07 +0000 (9 22:23 +0000)
committerRichard W.M. Jones <rjones@redhat.com>
Thu, 9 Mar 2023 22:52:03 +0000 (9 22:52 +0000)
tree76527475335421308d51eb1b0d7091d24a992475
parent97a80b18129df8789a6ae294d9d5d415c61816e7
states: Log the error when handle enters %DEAD state

In some cases user programs don't display the actual error from NBD.
Sometimes that's because it is hard, eg. in the callbacks in nbdcopy
where we only have the errno value.

This adds debug logging of the actual error string when we enter the
%DEAD state to make sure it is not lost.
generator/states.c