Beispiel #1
0
int rename(char *oldname,char *newname)
{
    int p1, p2;
    p1 = smbw_path(oldname);
    p2 = smbw_path(newname);
    if (p1 ^ p2) {
        /* can't cross filesystem boundaries */
        errno = EXDEV;
        return -1;
    }
    if (p1 && p2) {
        return smbw_rename(oldname, newname);
    }

    return real_rename(oldname, newname);
}
Beispiel #2
0
int rename(const char *oldname, const char *newname)
{
	int p1, p2;
        
        check_init("rename");
        
	p1 = smbw_path((char *) oldname); 
	p2 = smbw_path((char *) newname); 
	if (p1 ^ p2) {
		/* can't cross filesystem boundaries */
		errno = EXDEV;
		return -1;
	}
	if (p1 && p2) {
		return smbw_rename((char *) oldname, (char *) newname);
	}
        
        return (* smbw_libc.rename)((char *) oldname, (char *) newname);
}