Fix error reporting after ioctl() call with pg_upgrade --clone

Michael Paquier <michael@paquier.xyz>

Commit: aadaaeff4cf8b90c62dbb6cc67f5dd7e5a0297fe
Author: Michael Paquier <michael@paquier.xyz>
Date: 2022-08-01T07:39:30Z
Releases: 13.8
Fix error reporting after ioctl() call with pg_upgrade --clone

errno was not reported correctly after attempting to clone a file,
leading to incorrect error reports.  While scanning through the code, I
have not noticed any similar mistakes.

Error introduced in 3a769d8.

Author: Justin Pryzby
Discussion: https://postgr.es/m/20220731134135.GY15006@telsasoft.com
Backpatch-through: 12

Files

PathChange+/−
src/bin/pg_upgrade/file.c modified +3 −1

Discussion