/* this function is a POSIX compliant version, which will rename old file name to new file name. */
int rename(const char *old_file, const char *new_file)
/* this function is a POSIX compliant version, which will rename old file name to new file name. */
int rename(const char *old_file, const char *new_file)
{
    int result;
    if (old_file == NULL || new_file == NULL)
    {
        rt_set_errno(-EBADF);
        return -1;
    }
    result = dfs_file_rename(old_file, new_file);
    if (result < 0)
    {
        rt_set_errno(result);
        return -1;
    }
    return 0;
}