/*************************************************************** SYS-RENAME.C This file contains Linux/x86_64/LP64 implementation of __cpu_sys_rename(). PART OF : CPU - library . USAGE : Internal only . Copyright (C) 2026 by Andrew V.Kosteltsev. All Rights Reserved. ***************************************************************/ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include __mpu_int64_t __cpu_sys_rename( int dirfd, const char *oldpath, const char *newpath ) { if( !oldpath || !newpath ) return( -(__mpu_int64_t)__MCPU_EFAULT ); if( renameat( dirfd, oldpath, dirfd, newpath ) < 0 ) return( -(__mpu_int64_t)__cpu_errno_from_host( errno ) ); return( 0 ); } /* End of __cpu_sys_rename() */