am f298f6be: Merge "Use errno correctly."

* commit 'f298f6be4c8df8745735676e37ccc963909ff3b2':
  Use errno correctly.