int netfid, char * target_name, const struct nls_table * nls_codepage) 
int netfid, char * target_name, const struct nls_table * nls_codepage, int remap) 
int CIFSSMBRenameOpenFile(const int xid,struct cifsTconInfo *pTcon, 		int netfid, char * target_name, const struct nls_table * nls_codepage) {	struct smb_com_transaction2_sfi_req *pSMB  = NULL;	struct smb_com_transaction2_sfi_rsp *pSMBr = NULL;	struct set_file_rename * rename_info;	char *data_offset;	char dummy_string[30];	int rc = 0;	int bytes_returned = 0;	int len_of_str;	__u16 params, param_offset, offset, count, byte_count;	cFYI(1, ("Rename to File by handle"));	rc = smb_init(SMB_COM_TRANSACTION2, 15, pTcon, (void **) &pSMB,			(void **) &pSMBr);	if (rc)		return rc;	params = 6;	pSMB->MaxSetupCount = 0;	pSMB->Reserved = 0;	pSMB->Flags = 0;	pSMB->Timeout = 0;	pSMB->Reserved2 = 0;	param_offset = offsetof(struct smb_com_transaction2_sfi_req, Fid) - 4;	offset = param_offset + params;	data_offset = (char *) (&pSMB->hdr.Protocol) + offset;	rename_info = (struct set_file_rename *) data_offset;	pSMB->MaxParameterCount = cpu_to_le16(2);	pSMB->MaxDataCount = cpu_to_le16(1000); /* BB find max SMB PDU from sess */	pSMB->SetupCount = 1;	pSMB->Reserved3 = 0;	pSMB->SubCommand = cpu_to_le16(TRANS2_SET_FILE_INFORMATION);	byte_count = 3 /* pad */  + params;	pSMB->ParameterCount = cpu_to_le16(params);	pSMB->TotalParameterCount = pSMB->ParameterCount;	pSMB->ParameterOffset = cpu_to_le16(param_offset);	pSMB->DataOffset = cpu_to_le16(offset);	/* construct random name ".cifs_tmp<inodenum><mid>" */	rename_info->overwrite = cpu_to_le32(1);	rename_info->root_fid  = 0;	/* unicode only call */	if(target_name == NULL) {		sprintf(dummy_string,"cifs%x",pSMB->hdr.Mid);	        len_of_str = cifs_strtoUCS((wchar_t *) rename_info->target_name, dummy_string, 24, nls_codepage);	} else {		len_of_str = cifs_strtoUCS((wchar_t *) rename_info->target_name, target_name, PATH_MAX, nls_codepage);	}	rename_info->target_name_len = cpu_to_le32(2 * len_of_str);	count = 12 /* sizeof(struct set_file_rename) */ + (2 * len_of_str) + 2;	byte_count += count;	pSMB->DataCount = cpu_to_le16(count);	pSMB->TotalDataCount = pSMB->DataCount;	pSMB->Fid = netfid;	pSMB->InformationLevel =		cpu_to_le16(SMB_SET_FILE_RENAME_INFORMATION);	pSMB->Reserved4 = 0;	pSMB->hdr.smb_buf_length += byte_count;	pSMB->ByteCount = cpu_to_le16(byte_count);	rc = SendReceive(xid, pTcon->ses, (struct smb_hdr *) pSMB,                         (struct smb_hdr *) pSMBr, &bytes_returned, 0);	if (rc) {		cFYI(1,("Send error in Rename (by file handle) = %d", rc));	}#ifdef CONFIG_CIFS_STATS	  else {		atomic_inc(&pTcon->num_t2renames);	}#endif	cifs_buf_release(pSMB);	/* Note: On -EAGAIN error only caller can retry on handle based calls		since file handle passed in no longer valid */	return rc;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/737b758c965a9b223ac1243ab38d9e507ac86c64/cifssmb.c/clean/fs/cifs/cifssmb.c