Thanks to both of you. I installed the attached into Savannah master coreutils. It implements the suggestion, except that later I noticed that EMLINK and ETXTBSY can join the throng. At some point it might make sense to scan for other direct or indirect calls to renameat, renameat2, and linkat, where the diagnostic could be improved if it's known to refer to the destination.