Merge "Fix returning errno values which should be negative."