[ndctl PATCH] ndctl, log: save errno over calls to emit log messages