hal_io: Format system error messages in logs properly
This simplifies the logging of system error messages by passing
everything to a single fprintf
call. The error message is obtained
from strerror
- as we guard everything via a semaphore this should not
lead to any issue(s) we had in the past with it.
Fixes: #171 (closed)